diff --git a/Project.toml b/Project.toml index 007646b..ab983b7 100644 --- a/Project.toml +++ b/Project.toml @@ -1,7 +1,7 @@ name = "ParallelTestRunner" uuid = "d3525ed8-44d0-4b2c-a655-542cee43accc" authors = ["Valentin Churavy "] -version = "2.0.0" +version = "2.0.1" [deps] Dates = "ade2ca70-3891-5945-98fb-dc099432e06a" diff --git a/src/ParallelTestRunner.jl b/src/ParallelTestRunner.jl index ae91180..1463eee 100644 --- a/src/ParallelTestRunner.jl +++ b/src/ParallelTestRunner.jl @@ -484,7 +484,7 @@ function find_tests(dir::String) end for file in files - path = joinpath(rootpath, file * ".jl") + path = joinpath(rootpath, basename(file * ".jl")) tests[file] = :(include($path)) end end diff --git a/test/runtests.jl b/test/runtests.jl index 6c83431..4bf7e53 100644 --- a/test/runtests.jl +++ b/test/runtests.jl @@ -24,6 +24,13 @@ cd(@__DIR__) @test isfile(ParallelTestRunner.get_history_file(ParallelTestRunner)) end +@testset "subdir use" begin + d = @__DIR__ + testsuite = find_tests(d) + @test last(testsuite["basic"].args) == joinpath(d, "basic.jl") + @test last(testsuite["subdir/subdir_test"].args) == joinpath(d, "subdir", "subdir_test.jl") +end + @testset "custom tests" begin testsuite = Dict( "custom" => quote diff --git a/test/subdir/subdir_test.jl b/test/subdir/subdir_test.jl new file mode 100644 index 0000000..8a617b3 --- /dev/null +++ b/test/subdir/subdir_test.jl @@ -0,0 +1 @@ +@test true