Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: tools/nocompile_driver.py

Issue 2912193002: Enable no-compile tests on Windows
Patch Set: Revert "work around vs 12.0 bug" Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « testing/scripts/nacl_integration.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/nocompile_driver.py
diff --git a/tools/nocompile_driver.py b/tools/nocompile_driver.py
index 598e4130f6fe96cf6b88926a2220387e249d501a..fb6b5a169a570f0cf62eaf5d94296073586b09d9 100755
--- a/tools/nocompile_driver.py
+++ b/tools/nocompile_driver.py
@@ -212,16 +212,24 @@ def StartTest(sourcefile_path, cflags, config):
}
"""
# TODO(ajwong): Get the compiler from gyp.
- cmdline = [os.path.join(os.path.dirname(os.path.realpath(__file__)),
- '../third_party/llvm-build/Release+Asserts/bin',
- 'clang++')]
+ llvm_path = os.path.join(
+ os.path.dirname(os.path.realpath(__file__)),
+ '..', 'third_party', 'llvm-build', 'Release+Asserts', 'bin')
+ if os.name == 'nt':
+ clang = os.path.join(llvm_path, 'clang-cl.exe')
+ else:
+ clang = os.path.join(llvm_path, 'clang++')
+ cmdline = [clang]
cmdline.extend(shlex.split(cflags))
name = config['name']
expectations = config['expectations']
if expectations is not None:
cmdline.append('-D%s' % name)
- cmdline.extend(['-std=c++11', '-o', '/dev/null', '-c', '-x', 'c++',
- sourcefile_path])
+ if os.name == 'nt':
+ cmdline.extend(['/TP', '/c', sourcefile_path])
+ else:
+ cmdline.extend(['-std=c++11', '-o', '/dev/null', '-c', '-x', 'c++',
+ sourcefile_path])
process = subprocess.Popen(cmdline, stdout=subprocess.PIPE,
stderr=subprocess.PIPE)
@@ -374,7 +382,11 @@ def CompleteAtLeastOneTest(executing_tests):
read_set = []
for test in executing_tests.values():
read_set.extend([test['proc'].stderr, test['proc'].stdout])
- select.select(read_set, [], read_set, NCTEST_TERMINATE_TIMEOUT_SEC)
+ if os.name == 'nt':
+ # select cannot handle pipes on Windows.
+ time.sleep(0.1)
+ else:
+ select.select(read_set, [], read_set, NCTEST_TERMINATE_TIMEOUT_SEC)
# Now attempt to process results.
now = time.time()
@@ -433,9 +445,13 @@ def main():
executing_tests = {}
finished_tests = []
+ cflags_extra = ''
+ if os.name != 'nt':
+ cflags_extra = ' -MMD -MF %s.d -MT %s' % (resultfile_path, resultfile_path)
+
test = StartTest(
sourcefile_path,
- cflags + ' -MMD -MF %s.d -MT %s' % (resultfile_path, resultfile_path),
+ cflags + cflags_extra,
{ 'name': 'NCTEST_SANITY',
'suite_name': suite_name,
'expectations': None,
« no previous file with comments | « testing/scripts/nacl_integration.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698