[compiler-rt] r342869 - When running the ios/iossim prepare script show the script output when it returns with a non-zero exit code.

Dan Liew via llvm-commits llvm-commits at lists.llvm.org
Mon Sep 24 02:30:33 PDT 2018


Author: delcypher
Date: Mon Sep 24 02:30:33 2018
New Revision: 342869

URL: http://llvm.org/viewvc/llvm-project?rev=342869&view=rev
Log:
When running the ios/iossim prepare script show the script output when it returns with a non-zero exit code.

Summary:
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.

Reviewers: kubamracek, george.karpenkov

Subscribers: #sanitizers, llvm-commits

Differential Revision: https://reviews.llvm.org/D52350

Modified:
    compiler-rt/trunk/test/lit.common.cfg

Modified: compiler-rt/trunk/test/lit.common.cfg
URL: http://llvm.org/viewvc/llvm-project/compiler-rt/trunk/test/lit.common.cfg?rev=342869&r1=342868&r2=342869&view=diff
==============================================================================
--- compiler-rt/trunk/test/lit.common.cfg (original)
+++ compiler-rt/trunk/test/lit.common.cfg Mon Sep 24 02:30:33 2018
@@ -157,7 +157,12 @@ elif config.host_os == 'Darwin' and conf
   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)




More information about the llvm-commits mailing list