Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Test suite changes #2288

Merged
merged 2 commits into from
Mar 14, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions test/Project.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
[deps]
Adapt = "79e6a3ab-5dfb-504d-930d-738a2a938a0e"
Aqua = "4c88cf16-eb10-579e-8560-4a9242c79595"
BFloat16s = "ab4f0b2a-ad5b-11e8-123f-65d77653426b"
CUDA_Driver_jll = "4ee394cb-3365-5eb0-8335-949819d2adfc"
CUDA_Runtime_jll = "76a88914-d11a-5bdc-97e0-2f5a05c973a2"
Expand All @@ -23,6 +22,3 @@ SpecialFunctions = "276daf66-3868-5448-9aa4-cd146d93841b"
StaticArrays = "90137ffa-7385-5640-81b9-e52037218182"
Statistics = "10745b16-79ce-11e8-11f9-7d13ad32a3b2"
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40"

[compat]
Aqua = "0.8"
45 changes: 0 additions & 45 deletions test/base/aqua.jl

This file was deleted.

24 changes: 13 additions & 11 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -54,17 +54,8 @@ end
include("setup.jl") # make sure everything is precompiled

# choose tests
const tests = ["core/initialization"] # needs to run first
const tests = []
const test_runners = Dict()
## GPUArrays testsuite
for name in keys(TestSuite.tests)
if CUDA.default_memory != Mem.Device && name == "indexing scalar"
# GPUArrays' scalar indexing tests assume that indexing is not supported
continue
end
push!(tests, "gpuarrays/$name")
test_runners["gpuarrays/$name"] = ()->TestSuite.tests[name](CuArray)
end
## files in the test folder
for (rootpath, dirs, files) in walkdir(@__DIR__)
# find Julia files
Expand Down Expand Up @@ -92,11 +83,22 @@ for (rootpath, dirs, files) in walkdir(@__DIR__)
end

append!(tests, files)
sort(files; by=(file)->stat("$(@__DIR__)/$file.jl").size, rev=true) # large (slow) tests first
for file in files
test_runners[file] = ()->include("$(@__DIR__)/$file.jl")
end
end
sort!(tests; by=(file)->stat("$(@__DIR__)/$file.jl").size, rev=true)
## GPUArrays testsuite
for name in keys(TestSuite.tests)
if CUDA.default_memory != Mem.Device && name == "indexing scalar"
# GPUArrays' scalar indexing tests assume that indexing is not supported
continue
end
pushfirst!(tests, "gpuarrays/$name")
test_runners["gpuarrays/$name"] = ()->TestSuite.tests[name](CuArray)
end
## finalize
pushfirst!(tests, "core/initialization")
unique!(tests)

# list tests, if requested
Expand Down