diff --git a/Project.toml b/Project.toml index 8ea1659..c6f34e3 100644 --- a/Project.toml +++ b/Project.toml @@ -4,10 +4,8 @@ authors = ["Andrew R. Winters ", "Michael Schlottke- version = "0.1.0-pre" [deps] -Reexport = "189a3867-3050-52da-a836-e630ba90ab69" Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb" [compat] -Reexport = "1" Trixi = "0.5.17" julia = "1.8" diff --git a/src/TrixiShallowWater.jl b/src/TrixiShallowWater.jl index f477853..b72b67e 100644 --- a/src/TrixiShallowWater.jl +++ b/src/TrixiShallowWater.jl @@ -1,13 +1,10 @@ module TrixiShallowWater -# import @reexport now to make it available for further imports/exports -using Reexport: @reexport - -# Make all of Trixi.jl available to a user of this package -@reexport using Trixi +using Trixi: Trixi # Write your package code here. foo() = true bar() = false +baz() = Trixi.examples_dir() end diff --git a/test/Project.toml b/test/Project.toml index 0c36332..034c50c 100644 --- a/test/Project.toml +++ b/test/Project.toml @@ -1,2 +1,6 @@ [deps] Test = "8dfed614-e22c-5e08-85e1-65c5234f0b40" +Trixi = "a7f1ee26-1774-49b1-8366-f1abc58fbfcb" + +[compat] +Trixi = "0.5" diff --git a/test/runtests.jl b/test/runtests.jl index 18a579c..909d0e2 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -1,7 +1,24 @@ 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" + @test TrixiShallowWater.foo() == true + @test TrixiShallowWater.bar() == false + @test TrixiShallowWater.baz() isa String + end + + @time if TRIXI_TEST == "all" || TRIXI_TEST == "upstream" + @testset "baz()" begin + @test TrixiShallowWater.baz() isa String + end + end end