summaryrefslogtreecommitdiff
path: root/deps/v8/test/preparser/testcfg.py
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/test/preparser/testcfg.py')
-rw-r--r--deps/v8/test/preparser/testcfg.py9
1 files changed, 7 insertions, 2 deletions
diff --git a/deps/v8/test/preparser/testcfg.py b/deps/v8/test/preparser/testcfg.py
index 39b62c396..d900e2696 100644
--- a/deps/v8/test/preparser/testcfg.py
+++ b/deps/v8/test/preparser/testcfg.py
@@ -27,7 +27,7 @@
import test
import os
-from os.path import join, dirname, exists
+from os.path import join, dirname, exists, isfile
import platform
import utils
import re
@@ -122,10 +122,15 @@ class PreparserTestConfiguration(test.TestConfiguration):
{"Test": Test, "Template": Template}, {})
def ListTests(self, current_path, path, mode, variant_flags):
- executable = join('obj', 'preparser', mode, 'preparser')
+ executable = 'preparser'
if utils.IsWindows():
executable += '.exe'
executable = join(self.context.buildspace, executable)
+ if not isfile(executable):
+ executable = join('obj', 'preparser', mode, 'preparser')
+ if utils.IsWindows():
+ executable += '.exe'
+ executable = join(self.context.buildspace, executable)
expectations = self.GetExpectations()
result = []
# Find all .js files in tests/preparser directory.