chore: fix test suite on macOS (#12780)
MacOS uses a very old version of bash where `"${FOO[@]}"` fails if `set
-u` is enabled and `FOO` is undefined. Newer versions of bash expand
this to zero arguments instead.
Also, `lint.py` used the shebang `#!/usr/bin/env python` instead of
`python3`, which fails on some systems.
In CI, all macos tests run on nscloud runners. Presumably, they have
installed newer versions of various software, hence this didn't break in
CI.
This commit is contained in:
parent
73640d3758
commit
530925c69b
5 changed files with 7 additions and 8 deletions
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 Microsoft Corporation. All rights reserved.
|
# Copyright (c) 2015 Microsoft Corporation. All rights reserved.
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
#
|
#
|
||||||
# Copyright (c) 2015 Microsoft Corporation. All rights reserved.
|
# Copyright (c) 2015 Microsoft Corporation. All rights reserved.
|
||||||
|
|
|
||||||
|
|
@ -407,7 +407,7 @@ endforeach(T)
|
||||||
|
|
||||||
# Lint test suite and parts of the repository.
|
# Lint test suite and parts of the repository.
|
||||||
# Must not run in parallel with any other tests that may create or delete files.
|
# Must not run in parallel with any other tests that may create or delete files.
|
||||||
add_test(NAME lint.py COMMAND python lint.py WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
add_test(NAME lint.py COMMAND python3 lint.py WORKING_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}")
|
||||||
set_tests_properties(lint.py PROPERTIES RUN_SERIAL TRUE)
|
set_tests_properties(lint.py PROPERTIES RUN_SERIAL TRUE)
|
||||||
|
|
||||||
add_test_pile(compile *.lean BENCH PART2)
|
add_test_pile(compile *.lean BENCH PART2)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#!/usr/bin/env python
|
#!/usr/bin/env python3
|
||||||
|
|
||||||
import os
|
import os
|
||||||
import sys
|
import sys
|
||||||
|
|
@ -190,11 +190,10 @@ for file in Path().glob("**/run_bench"):
|
||||||
nag("has env_test.sh", file)
|
nag("has env_test.sh", file)
|
||||||
|
|
||||||
|
|
||||||
# File confusion by case insensitive filesystems,
|
# File confusion by case insensitive filesystems
|
||||||
# applies to entire repository
|
|
||||||
|
|
||||||
seen: set[str] = set()
|
seen: set[str] = set()
|
||||||
for file in Path("..").glob("**/*"):
|
for file in Path().glob("**/*"):
|
||||||
path = str(file).lower()
|
path = str(file).lower()
|
||||||
if path in seen:
|
if path in seen:
|
||||||
nag("case sensitive", file)
|
nag("case sensitive", file)
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
set -eu
|
set -e
|
||||||
|
|
||||||
DIFF="diff -au --strip-trailing-cr --color=always"
|
DIFF="diff -au --strip-trailing-cr --color=always"
|
||||||
ulimit -S -s ${TEST_STACK_SIZE:-8192}
|
ulimit -S -s ${TEST_STACK_SIZE:-8192}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue