Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
CarloLucibello committed Oct 19, 2024
1 parent 5c59767 commit ced209b
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
3 changes: 2 additions & 1 deletion test/misc_tests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ using ArrayInterface: parameterless_type
using ChainRulesTestUtils: test_rrule
using ReverseDiff, Tracker, ForwardDiff
using SparseArrays, FillArrays, Zygote, RecursiveArrayTools
using Functors: Functors

@testset "Issues Patches" begin
@testset "#10 patch" begin
Expand Down Expand Up @@ -172,7 +173,7 @@ end

cpu = cpu_device()
t = Tleaf(ones(2))
t = cpu(t)
y = cpu(t)
@test y.x == 2 .* ones(2)
y = cpu([(t,)])
@test y[1][1].x == 2 .* ones(2)
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import Pkg
using SafeTestsets, Test
using Functors: Functors

const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", "none"))

Expand All @@ -24,7 +23,8 @@ end
all_files = ["cuda_tests.jl", "amdgpu_tests.jl",
"metal_tests.jl", "oneapi_tests.jl", "xla_tests.jl"]
file_names = BACKEND_GROUP == "all" ? all_files :
(BACKEND_GROUP == "cpu" ? [] : [BACKEND_GROUP * "_tests.jl"])
BACKEND_GROUP ("cpu", "none") ? [] :
[BACKEND_GROUP * "_tests.jl"]
@testset "$(file_name)" for file_name in file_names
run(`$(Base.julia_cmd()) --color=yes --project=$(dirname(Pkg.project().path))
--startup-file=no --code-coverage=user $(@__DIR__)/$file_name`)
Expand Down

0 comments on commit ced209b

Please sign in to comment.