diff --git a/script/gen_constants_cpp.py b/script/gen_constants_cpp.py index a6b2c6203d..1c33f8db6a 100755 --- a/script/gen_constants_cpp.py +++ b/script/gen_constants_cpp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2015 Microsoft Corporation. All rights reserved. diff --git a/script/gen_tokens_cpp.py b/script/gen_tokens_cpp.py index 16e4117721..5d354479f5 100755 --- a/script/gen_tokens_cpp.py +++ b/script/gen_tokens_cpp.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 # -*- coding: utf-8 -*- # # Copyright (c) 2015 Microsoft Corporation. All rights reserved. diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 72538abebd..a5d9ff911f 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -407,7 +407,7 @@ endforeach(T) # Lint test suite and parts of the repository. # 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) add_test_pile(compile *.lean BENCH PART2) diff --git a/tests/lint.py b/tests/lint.py index 25c02cf8f3..d1ecc43762 100755 --- a/tests/lint.py +++ b/tests/lint.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python3 import os import sys @@ -190,11 +190,10 @@ for file in Path().glob("**/run_bench"): nag("has env_test.sh", file) -# File confusion by case insensitive filesystems, -# applies to entire repository +# File confusion by case insensitive filesystems seen: set[str] = set() -for file in Path("..").glob("**/*"): +for file in Path().glob("**/*"): path = str(file).lower() if path in seen: nag("case sensitive", file) diff --git a/tests/util.sh b/tests/util.sh index 0f5e1634fb..2244062112 100644 --- a/tests/util.sh +++ b/tests/util.sh @@ -1,4 +1,4 @@ -set -eu +set -e DIFF="diff -au --strip-trailing-cr --color=always" ulimit -S -s ${TEST_STACK_SIZE:-8192}