Skip to content

Commit

Permalink
SLPTest: deal with SLPTest module and custom include function
Browse files Browse the repository at this point in the history
  • Loading branch information
benlorenz authored and fingolfin committed Sep 18, 2023
1 parent f1c7792 commit 61305e1
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
10 changes: 6 additions & 4 deletions test/StraightLinePrograms/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,11 @@ using ..Oscar
const SLP = Oscar.StraightLinePrograms

# make sure to use the custom include function to collect stats
Main.include("setup.jl")
Main.include("straightline.jl")
Main.include("gap.jl")
Main.include("atlas.jl")
include(str::String) = Main.include(str, SLPTest)

include("setup.jl")
include("straightline.jl")
include("gap.jl")
include("atlas.jl")

end
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -71,14 +71,14 @@ end
# include other files
@everywhere const innermost = Ref(true)
# redefine include to print and collect some extra stats
@everywhere function include(str::String)
@everywhere function include(str::String, mod::Module=Main)
push!(included_files, joinpath(Base.source_dir(), str))
innermost[] = true
# we pass the identity to avoid recursing into this function again
@static if compiletimes
compile_elapsedtimes = Base.cumulative_compile_time_ns()
end
stats = @timed Base.include(identity, Main, str)
stats = @timed Base.include(identity, mod, str)
# skip files which just include other files and ignore
# files outside of the oscar folder
if innermost[] && !isabspath(str)
Expand Down

0 comments on commit 61305e1

Please sign in to comment.