Skip to content

Commit 9e69dab

Browse files
c42ftopolarity
authored andcommitted
Add JuliaSyntax to TESTNAMES / make test
1 parent 76122d6 commit 9e69dab

File tree

2 files changed

+16
-4
lines changed

2 files changed

+16
-4
lines changed

test/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ export JULIA_LOAD_PATH := @$(PATHSEP)@stdlib
1111
unexport JULIA_PROJECT :=
1212
unexport JULIA_BINDIR :=
1313

14-
TESTGROUPS = unicode strings compiler Compiler
14+
TESTGROUPS = unicode strings compiler Compiler JuliaSyntax
1515
TESTS = all default stdlib $(TESTGROUPS) \
1616
$(patsubst $(STDLIBDIR)/%/,%,$(dir $(wildcard $(STDLIBDIR)/*/.))) \
1717
$(filter-out runtests testdefs relocatedepot, \

test/choosetests.jl

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,8 @@ const TESTNAMES = [
3030
"reinterpretarray", "syntax", "corelogging", "missing", "asyncmap",
3131
"smallarrayshrink", "opaque_closure", "filesystem", "download",
3232
"scopedvalues", "compileall", "rebinding",
33-
"faulty_constructor_method_should_not_cause_stack_overflows"
33+
"faulty_constructor_method_should_not_cause_stack_overflows",
34+
"JuliaSyntax"
3435
]
3536

3637
const INTERNET_REQUIRED_LIST = [
@@ -46,6 +47,12 @@ const INTERNET_REQUIRED_LIST = [
4647

4748
const NETWORK_REQUIRED_LIST = vcat(INTERNET_REQUIRED_LIST, ["Sockets"])
4849

50+
const TOP_LEVEL_PKGS = [
51+
"Compiler"
52+
"JuliaSyntax"
53+
"JuliaLowering"
54+
]
55+
4956
function test_path(test)
5057
t = split(test, '/')
5158
if t[1] in STDLIBS
@@ -61,6 +68,9 @@ function test_path(test)
6168
elseif t[1] == "Compiler"
6269
testpath = length(t) >= 2 ? t[2:end] : ("runtests",)
6370
return joinpath(@__DIR__, "..", t[1], "test", testpath...)
71+
elseif t[1] == "JuliaSyntax"
72+
testpath = length(t) >= 2 ? t[2:end] : ("runtests_vendored",)
73+
return joinpath(@__DIR__, "..", t[1], "test", testpath...)
6474
else
6575
return joinpath(@__DIR__, test)
6676
end
@@ -225,9 +235,11 @@ function choosetests(choices = [])
225235
filter!(!in(tests), unhandled)
226236
filter!(!in(skip_tests), tests)
227237

238+
is_package_test(testname) = testname in STDLIBS || testname in TOP_LEVEL_PKGS
239+
228240
new_tests = String[]
229241
for test in tests
230-
if test in STDLIBS || test == "Compiler"
242+
if is_package_test(test)
231243
testfile = test_path("$test/testgroups")
232244
if isfile(testfile)
233245
testgroups = readlines(testfile)
@@ -238,7 +250,7 @@ function choosetests(choices = [])
238250
end
239251
end
240252
end
241-
filter!(x -> (x != "stdlib" && !(x in STDLIBS) && x != "Compiler") , tests)
253+
filter!(x -> (x != "stdlib" && !is_package_test(x)) , tests)
242254
append!(tests, new_tests)
243255

244256
requested_all || explicit_pkg || filter!(x -> x != "Pkg", tests)

0 commit comments

Comments
 (0)