Files
JuliaFEM.jl/test/runtests.jl
T
Tony Kelman dcd24e8e01 Use @__DIR__ instead of Pkg.dir
this allows installing and loading the package from elsewhere
2017-08-05 12:02:00 +03:00

28 lines
789 B
Julia

# This file is a part of JuliaFEM.
# License is MIT: see https://github.com/JuliaFEM/JuliaFEM.jl/blob/master/LICENSE.md
using Base.Test
using TimerOutputs
pkg_dir = dirname(@__DIR__)
maybe_test_files = readdir(joinpath(pkg_dir, "test"))
is_test_file(fn) = startswith(fn, "test_") & endswith(fn, ".jl")
test_files = filter(is_test_file, maybe_test_files)
info("$(length(test_files)) test files found.")
const to = TimerOutput()
@testset "JuliaFEM.jl" begin
for fn in test_files
info("----- Running tests from file $fn -----")
t0 = time()
timeit(to, fn) do
include(fn)
end
dt = round(time() - t0, 2)
info("----- Testing file $fn completed in $dt seconds -----")
end
end
println()
println("Test statistics:")
println(to)