Skip to content

Commit

Permalink
Add function that actually exercises Trixi
Browse files Browse the repository at this point in the history
  • Loading branch information
sloede committed Nov 5, 2023
1 parent 347bb5d commit 6fda51a
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/TrixiShallowWater.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ using Trixi: Trixi
# Write your package code here.
foo() = true
bar() = false
baz() = Trixi.examples_dir()

end
8 changes: 5 additions & 3 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,15 @@ 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"
@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"
@test TrixiShallowWater.foo() == true
@test TrixiShallowWater.bar() == false
@testset "baz()" begin
@test TrixiShallowWater.baz() isa String
end
end
end

0 comments on commit 6fda51a

Please sign in to comment.