summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLouis Dionne <ldionne@apple.com>2019-08-05 21:26:50 +0000
committerLouis Dionne <ldionne@apple.com>2019-08-05 21:26:50 +0000
commitd1317133071e22ddd9ea0b78038a7d125ee9a36d (patch)
tree282dea617d8a6dec7fa9eb0e02ee4192e9485755
parent1d73e228db39f9755bc601bc863b5701f22a9d6b (diff)
downloadbcm5719-llvm-d1317133071e22ddd9ea0b78038a7d125ee9a36d.tar.gz
bcm5719-llvm-d1317133071e22ddd9ea0b78038a7d125ee9a36d.zip
[libc++] Accept any non-zero return for .fail.cpp tests
llvm-svn: 367930
-rw-r--r--libcxx/utils/libcxx/test/format.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/libcxx/utils/libcxx/test/format.py b/libcxx/utils/libcxx/test/format.py
index 122014272db..f8d0a85545d 100644
--- a/libcxx/utils/libcxx/test/format.py
+++ b/libcxx/utils/libcxx/test/format.py
@@ -255,9 +255,9 @@ class LibcxxTestFormat(object):
if any(test_str in contents for test_str in test_str_list):
test_cxx.flags += ['-Werror=unused-result']
cmd, out, err, rc = test_cxx.compile(source_path, out=os.devnull)
- expected_rc = 0 if use_verify else 1
+ check_rc = lambda rc: rc == 0 if use_verify else rc != 0
report = libcxx.util.makeReport(cmd, out, err, rc)
- if rc == expected_rc:
+ if check_rc(rc):
return lit.Test.Result(lit.Test.PASS, report)
else:
report += ('Expected compilation to fail!\n' if not use_verify else
OpenPOWER on IntegriCloud