summaryrefslogtreecommitdiff
path: root/indra/cmake/run_build_test.py
diff options
context:
space:
mode:
authorMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
committerMnikolenko ProductEngine <mnikolenko@productengine.com>2015-04-28 13:36:35 +0300
commitbb87365c37047a35bf524a98d5a48cdb2d56948e (patch)
tree5b44b30944f794c2e2f78a0990cf56f81d27fa78 /indra/cmake/run_build_test.py
parenta89f3f29a0af37c7f3e78e38acb78f78e99dae78 (diff)
parentfde0868231a25b8c9ce03a86cb53f1738d35688d (diff)
Merge viewer-release, become version 3.7.29
Diffstat (limited to 'indra/cmake/run_build_test.py')
-rwxr-xr-xindra/cmake/run_build_test.py19
1 files changed, 18 insertions, 1 deletions
diff --git a/indra/cmake/run_build_test.py b/indra/cmake/run_build_test.py
index a2ef61c8fd..582185e5ab 100755
--- a/indra/cmake/run_build_test.py
+++ b/indra/cmake/run_build_test.py
@@ -46,6 +46,7 @@ $/LicenseInfo$
import os
import sys
+import errno
import signal
import subprocess
@@ -112,7 +113,23 @@ def main(command, libpath=[], vars={}):
print "Running: %s" % " ".join(command)
# Make sure we see all relevant output *before* child-process output.
sys.stdout.flush()
- return subprocess.call(command)
+ try:
+ return subprocess.call(command)
+ except OSError as err:
+ # If the caller is trying to execute a test program that doesn't
+ # exist, we want to produce a reasonable error message rather than a
+ # traceback. This happens when the build is halted by errors, but
+ # CMake tries to proceed with testing anyway <eyeroll/>. However, do
+ # NOT attempt to handle any error but "doesn't exist."
+ if err.errno != errno.ENOENT:
+ raise
+ # In practice, the pathnames into CMake's build tree are so long as to
+ # obscure the name of the test program. Just print its basename.
+ print "No such program %s; check for preceding build errors" % \
+ os.path.basename(command[0])
+ # What rc should we simulate for missing executable? Windows produces
+ # 9009.
+ return 9009
# swiped from vita, sigh, seems like a Bad Idea to introduce dependency
def translate_rc(rc):