-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test: cleanup tests and avoid interference
- Loading branch information
Showing
9 changed files
with
48 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
using Aqua, LuxDeviceUtils, Test | ||
|
||
@testset "Aqua Tests" begin | ||
Aqua.test_all(LuxDeviceUtils) | ||
end | ||
|
||
import FillArrays, RecursiveArrayTools, SparseArrays, Zygote | ||
|
||
@testset "Explicit Imports" begin | ||
@test check_no_implicit_imports(LuxDeviceUtils) === nothing | ||
@test check_no_stale_explicit_imports(LuxDeviceUtils) === nothing | ||
@test check_no_self_qualified_accesses(LuxDeviceUtils) === nothing | ||
@test check_all_explicit_imports_via_owners(LuxDeviceUtils) === nothing | ||
@test check_all_qualified_accesses_via_owners(LuxDeviceUtils) === nothing | ||
@test_broken check_all_explicit_imports_are_public(LuxDeviceUtils) === nothing # mostly upstream problems | ||
@test_broken check_all_qualified_accesses_are_public(LuxDeviceUtils) === nothing # mostly upstream problem | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
import Pkg | ||
using Aqua, SafeTestsets, Test, LuxDeviceUtils, TestSetExtensions | ||
using SafeTestsets, Test | ||
|
||
const BACKEND_GROUP = get(ENV, "BACKEND_GROUP", "NONE") | ||
const BACKEND_GROUP = lowercase(get(ENV, "BACKEND_GROUP", "NONE")) | ||
|
||
@testset ExtendedTestSet "LuxDeviceUtils Tests" begin | ||
if BACKEND_GROUP == "CUDA" || BACKEND_GROUP == "ALL" | ||
Pkg.add("LuxCUDA") | ||
@safetestset "CUDA" include("cuda.jl") | ||
end | ||
const EXTRA_PKGS = String[] | ||
|
||
if BACKEND_GROUP == "AMDGPU" || BACKEND_GROUP == "ALL" | ||
Pkg.add("AMDGPU") | ||
@safetestset "AMDGPU" include("amdgpu.jl") | ||
end | ||
(BACKEND_GROUP == "all" || BACKEND_GROUP == "cuda") && push!(EXTRA_PKGS, "LuxCUDA") | ||
(BACKEND_GROUP == "all" || BACKEND_GROUP == "amdgpu") && push!(EXTRA_PKGS, "AMDGPU") | ||
(BACKEND_GROUP == "all" || BACKEND_GROUP == "oneapi") && push!(EXTRA_PKGS, "oneAPI") | ||
(BACKEND_GROUP == "all" || BACKEND_GROUP == "metal") && push!(EXTRA_PKGS, "Metal") | ||
|
||
if BACKEND_GROUP == "Metal" || BACKEND_GROUP == "ALL" | ||
Pkg.add("Metal") | ||
@safetestset "Metal" include("metal.jl") | ||
end | ||
if !isempty(EXTRA_PKGS) | ||
@info "Installing Extra Packages for testing" EXTRA_PKGS=EXTRA_PKGS | ||
Pkg.add(EXTRA_PKGS) | ||
Pkg.update() | ||
Base.retry_load_extensions() | ||
Pkg.instantiate() | ||
end | ||
|
||
if BACKEND_GROUP == "oneAPI" || BACKEND_GROUP == "ALL" | ||
Pkg.add("oneAPI") | ||
@safetestset "oneAPI" include("oneapi.jl") | ||
@testset "LuxDeviceUtils Tests" begin | ||
file_names = BACKEND_GROUP == "all" ? | ||
["cuda_tests.jl", "amdgpu_tests.jl", "metal_tests.jl", "oneapi_tests.jl"] : | ||
[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`) | ||
Test.@test true | ||
end | ||
|
||
@testset "Others" begin | ||
@testset "Aqua Tests" Aqua.test_all(LuxDeviceUtils) | ||
|
||
@safetestset "Misc Tests" include("misc.jl") | ||
@safetestset "Misc Tests" include("misc_tests.jl") | ||
|
||
@safetestset "Explicit Imports" include("explicit_imports.jl") | ||
end | ||
@safetestset "QA Tests" include("qa_tests.jl") | ||
end |