Commit ae32c22f authored by Charlie Harrison's avatar Charlie Harrison Committed by Commit Bot

Re-land: Fix flatbuffers failures-mode

This re-lands this CL:
https://chromium-review.googlesource.com/c/chromium/src/+/1503614

Which was reverted here:
https://chromium-review.googlesource.com/c/chromium/src/+/1504597

There's one additional change, which is to ensure that windows
runtime_libs are available as data_deps. This omission was causing
failures on win_chromium_dbg_ng.

Bug: 938020
Change-Id: Id0196d86097f938d046c7936e619d1c7cf8174c3
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1506124Reviewed-by: default avatarDirk Pranke <dpranke@chromium.org>
Commit-Queue: Charlie Harrison <csharrison@chromium.org>
Cr-Commit-Position: refs/heads/master@{#638684}
parent 21a23281
...@@ -40,15 +40,16 @@ def main(): ...@@ -40,15 +40,16 @@ def main():
exe = os.path.join('.', 'flatbuffers_unittests') exe = os.path.join('.', 'flatbuffers_unittests')
env = os.environ.copy() env = os.environ.copy()
failures = []
with common.temporary_file() as tempfile_path: with common.temporary_file() as tempfile_path:
rc = xvfb.run_executable([exe], env, stdoutfile=tempfile_path) rc = xvfb.run_executable([exe], env, stdoutfile=tempfile_path)
# The flatbuffer tests do not really conform to anything parsable, except # The flatbuffer tests do not really conform to anything parsable, except
# that they will succeed with "ALL TESTS PASSED". # that they will succeed with "ALL TESTS PASSED".
with open(tempfile_path) as f: with open(tempfile_path) as f:
failures = f.read() output = f.read()
if failures == "ALL TESTS PASSED\n": if output != "ALL TESTS PASSED\n":
failures = [] failures = [output]
with open(args.isolated_script_test_output, 'w') as fp: with open(args.isolated_script_test_output, 'w') as fp:
json.dump({'valid': True,'failures': failures}, fp) json.dump({'valid': True,'failures': failures}, fp)
......
...@@ -17,6 +17,10 @@ source_set("flatbuffers") { ...@@ -17,6 +17,10 @@ source_set("flatbuffers") {
"src/include/flatbuffers/stl_emulation.h", "src/include/flatbuffers/stl_emulation.h",
] ]
if (is_win) {
data_deps = [ "//build/win:runtime_libs" ]
}
configs -= [ "//build/config/compiler:chromium_code" ] configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ] configs += [ "//build/config/compiler:no_chromium_code" ]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment