Skip to content

Commit fb52730

Browse files
KristofferCJeffBezanson
authored andcommitted
error on missing testfile (#25408)
1 parent f41a8f8 commit fb52730

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/runtests.jl

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,16 +18,19 @@ end
1818

1919
function test_path(test)
2020
if test in STDLIBS
21-
test_file = joinpath(STDLIB_DIR, test, "test", "runtests")
22-
if !isfile(test_file * ".jl")
23-
error("Standard library $test did not provide a `test/runtests.jl` file")
24-
end
25-
return test_file
21+
return joinpath(STDLIB_DIR, test, "test", "runtests")
2622
else
27-
return test
23+
return joinpath(@__DIR__, test)
2824
end
2925
end
3026

27+
# Check all test files exist
28+
isfiles = isfile.(test_path.(tests) .* ".jl")
29+
if any(equalto(false), isfiles)
30+
error("did not find test files for the following tests: ",
31+
join(tests[.!(isfiles)], ", "))
32+
end
33+
3134
const node1_tests = String[]
3235
function move_to_node1(t)
3336
if t in tests

0 commit comments

Comments
 (0)