-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
22 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,6 @@ | ||
[deps] | ||
Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" | ||
Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb" | ||
|
||
[compat] | ||
Trixi = "0.5" |
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,7 +1,22 @@ | ||
using TrixiShallowWater | ||
using Test | ||
|
||
@testset "TrixiShallowWater.jl" begin | ||
@test TrixiShallowWater.foo() == true | ||
@test TrixiShallowWater.bar() == false | ||
# We run tests in parallel with CI jobs setting the `TRIXI_TEST` environment | ||
# variable to determine the subset of tests to execute. | ||
# By default, we just run the threaded tests since they are relatively cheap | ||
# and test a good amount of different functionality. | ||
const TRIXI_TEST = get(ENV, "TRIXI_TEST", "all") | ||
const TRIXI_MPI_NPROCS = clamp(Sys.CPU_THREADS, 2, 3) | ||
const TRIXI_NTHREADS = clamp(Sys.CPU_THREADS, 2, 3) | ||
|
||
@time @testset "TrixiShallowWater.jl tests" begin | ||
@time if TRIXI_TEST == "all" || TRIXI_TEST == "mpi" | ||
@test TrixiShallowWater.foo() == true | ||
@test TrixiShallowWater.bar() == false | ||
end | ||
|
||
@time if TRIXI_TEST == "all" || TRIXI_TEST == "upstream" | ||
@test TrixiShallowWater.foo() == true | ||
@test TrixiShallowWater.bar() == false | ||
end | ||
end |