diff --git a/test/cctest/testcfg.py b/test/cctest/testcfg.py index b67002f53a..69a5db2044 100644 --- a/test/cctest/testcfg.py +++ b/test/cctest/testcfg.py @@ -38,16 +38,20 @@ class CcTestSuite(testsuite.TestSuite): def __init__(self, name, root): super(CcTestSuite, self).__init__(name, root) - self.serdes_dir = normpath(join(root, "..", "..", "out", ".serdes")) - if exists(self.serdes_dir): + self.serdes_dir = os.path.normpath( + os.path.join(root, "..", "..", "out", ".serdes")) + if os.path.exists(self.serdes_dir): shutil.rmtree(self.serdes_dir, True) os.makedirs(self.serdes_dir) def ListTests(self, context): - shell = join(context.shell_dir, self.shell()) if utils.IsWindows(): shell += '.exe' - output = commands.Execute([shell, '--list']) + shell = os.path.abspath(os.path.join(context.shell_dir, self.shell())) + output = commands.Execute([context.command_prefix, + shell, + '--list', + context.extra_flags]) if output.exit_code != 0: print output.stdout print output.stderr @@ -66,7 +70,7 @@ class CcTestSuite(testsuite.TestSuite): def GetFlagsForTestCase(self, testcase, context): testname = testcase.path.split(os.path.sep)[-1] - serialization_file = join(self.serdes_dir, "serdes_" + testname) + serialization_file = os.path.join(self.serdes_dir, "serdes_" + testname) serialization_file += ''.join(testcase.flags).replace('-', '_') return (testcase.flags + [testcase.path] + context.mode_flags + ["--testing_serialization_file=" + serialization_file]) diff --git a/tools/run-tests.py b/tools/run-tests.py index 5d90d1947e..a49f6560a6 100755 --- a/tools/run-tests.py +++ b/tools/run-tests.py @@ -60,6 +60,13 @@ MODE_FLAGS = { "--enable-slow-asserts", "--debug-code", "--verify-heap"], "release" : ["--nobreak-on-abort", "--nodead-code-elimination"]} +SUPPORTED_ARCHS = ["android_arm", + "android_ia32", + "arm", + "ia32", + "mipsel", + "x64"] + def BuildOptions(): result = optparse.OptionParser() @@ -150,7 +157,7 @@ def ProcessOptions(options): options.arch = ARCH_GUESS options.arch = options.arch.split(",") for arch in options.arch: - if not arch in ['ia32', 'x64', 'arm', 'mipsel']: + if not arch in SUPPORTED_ARCHS: print "Unknown architecture %s" % arch return False diff --git a/tools/testrunner/local/commands.py b/tools/testrunner/local/commands.py index 716d7ba8fb..01f170dc87 100644 --- a/tools/testrunner/local/commands.py +++ b/tools/testrunner/local/commands.py @@ -131,6 +131,7 @@ def CheckedUnlink(name): def Execute(args, verbose=False, timeout=None): + args = [ c for c in args if c != "" ] (fd_out, outname) = tempfile.mkstemp() (fd_err, errname) = tempfile.mkstemp() try: diff --git a/tools/testrunner/local/execution.py b/tools/testrunner/local/execution.py index 0adf9c9071..6004367913 100644 --- a/tools/testrunner/local/execution.py +++ b/tools/testrunner/local/execution.py @@ -168,11 +168,10 @@ class Runner(object): if utils.IsWindows(): shell += ".exe" cmd = ([self.context.command_prefix] + - [os.path.join(self.context.shell_dir, shell)] + + [os.path.abspath(os.path.join(self.context.shell_dir, shell))] + d8testflag + test.suite.GetFlagsForTestCase(test, self.context) + [self.context.extra_flags]) - cmd = [ c for c in cmd if c != "" ] return cmd