[PATCH] D52350: When running the ios/iossim prepare script show the script output when it returns with a non-zero exit code.

Dan Liew via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Fri Sep 21 03:50:27 PDT 2018


delcypher created this revision.
delcypher added reviewers: kubamracek, george.karpenkov.
Herald added a subscriber: Sanitizers.

Previously we'd just show the exception and not the output from the
executed script. This is unhelpful in the case that the script actually
reports some useful information on the failure.

Now we print the output and re-raise the exception.


Repository:
  rCRT Compiler Runtime

https://reviews.llvm.org/D52350

Files:
  test/lit.common.cfg


Index: test/lit.common.cfg
===================================================================
--- test/lit.common.cfg
+++ test/lit.common.cfg
@@ -157,7 +157,12 @@
   config.substitutions.append(('%device_rm', '{} rm '.format(run_wrapper)))
   config.compile_wrapper = compile_wrapper
 
-  prepare_output = subprocess.check_output([prepare_script, config.apple_platform, config.clang]).strip()
+  try:
+    prepare_output = subprocess.check_output([prepare_script, config.apple_platform, config.clang]).strip()
+  except subprocess.CalledProcessError as e:
+    print("Command failed:")
+    print(e.output)
+    raise e
   if len(prepare_output) > 0: print(prepare_output)
   prepare_output_json = prepare_output.split("\n")[-1]
   prepare_output = json.loads(prepare_output_json)


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D52350.166440.patch
Type: text/x-patch
Size: 782 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20180921/7e704b43/attachment.bin>


More information about the llvm-commits mailing list