[llvm-commits] [llvm] r154665 - /llvm/trunk/test/lit.cfg

Sylvestre Ledru sylvestre at debian.org
Fri Apr 13 04:23:28 PDT 2012


Hello

I hope I won't break any of the build robot with this commit ...
Don't hesitate to revert this commit if it is the case.

Sylvestre

On 13/04/2012 13:22, Sylvestre Ledru wrote:
> Author: sylvestre
> Date: Fri Apr 13 06:22:18 2012
> New Revision: 154665
>
> URL: http://llvm.org/viewvc/llvm-project?rev=154665&view=rev
> Log:
> Catch the Python exception when subprocess.Popen is failing.
>
> For example, if llc cannot be found, the full python stacktrace is displayed
> and no interesting information are provided.
> + fail the process when an exception occurs
>
>
> Modified:
>      llvm/trunk/test/lit.cfg
>
> Modified: llvm/trunk/test/lit.cfg
> URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/test/lit.cfg?rev=154665&r1=154664&r2=154665&view=diff
> ==============================================================================
> --- llvm/trunk/test/lit.cfg (original)
> +++ llvm/trunk/test/lit.cfg Fri Apr 13 06:22:18 2012
> @@ -236,8 +236,13 @@
>
>   # llc knows whether he is compiled with -DNDEBUG.
>   import subprocess
> -llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
> +try:
> +    llc_cmd = subprocess.Popen([os.path.join(llvm_tools_dir, 'llc'), '-version'],
>                              stdout = subprocess.PIPE)
> +except OSError, why:
> +    print "Could not find llc in " + llvm_tools_dir
> +    exit(42)
> +
>   if re.search(r'with assertions', llc_cmd.stdout.read()):
>       config.available_features.add('asserts')
>   llc_cmd.wait()
>
>
> _______________________________________________
> llvm-commits mailing list
> llvm-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits




More information about the llvm-commits mailing list