diff options
-rw-r--r-- | lldb/lit/Suite/lldbtest.py | 5 | ||||
-rw-r--r-- | lldb/packages/Python/lldbsuite/test/make/Makefile.rules | 10 |
2 files changed, 9 insertions, 6 deletions
diff --git a/lldb/lit/Suite/lldbtest.py b/lldb/lit/Suite/lldbtest.py index 457b74e4d90..4c3f01b803a 100644 --- a/lldb/lit/Suite/lldbtest.py +++ b/lldb/lit/Suite/lldbtest.py @@ -41,7 +41,10 @@ class LLDBTest(TestFormat): return (lit.Test.UNSUPPORTED, 'Test is unsupported') testPath, testFile = os.path.split(test.getSourcePath()) - cmd = self.dotest_cmd + [testPath, '-p', testFile] + # On Windows, the system does not always correctly interpret shebang lines. + # To make sure we can execute the tests, add python exe as the first parameter + # of the command. + cmd = [sys.executable] + self.dotest_cmd + [testPath, '-p', testFile] try: out, err, exitCode = lit.util.executeCommand( diff --git a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules index facd33cf80c..802624c674b 100644 --- a/lldb/packages/Python/lldbsuite/test/make/Makefile.rules +++ b/lldb/packages/Python/lldbsuite/test/make/Makefile.rules @@ -36,13 +36,13 @@ LLDB_BASE_DIR := $(THIS_FILE_DIR)../../../../../ #---------------------------------------------------------------------- # If OS is not defined, use 'uname -s' to determine the OS name. # -# uname on Windows gives "windows32", but most environments standardize -# on "Windows_NT", so we'll make it consistent here. When running -# tests from Visual Studio, the environment variable isn't inherited -# all the way down to the process spawned for make. +# uname on Windows gives "windows32" or "server version windows32", but most +# environments standardize on "Windows_NT", so we'll make it consistent here. +# When running tests from Visual Studio, the environment variable isn't +# inherited all the way down to the process spawned for make. #---------------------------------------------------------------------- HOST_OS = $(shell uname -s) -ifeq "$(HOST_OS)" "windows32" +ifneq (,$(findstring windows32,$(HOST_OS))) HOST_OS = Windows_NT endif ifeq "$(OS)" "" |