[libcxx-commits] [libcxx] r367930 - [libc++] Accept any non-zero return for .fail.cpp tests
Louis Dionne via libcxx-commits
libcxx-commits at lists.llvm.org
Mon Aug 5 14:26:50 PDT 2019
Author: ldionne
Date: Mon Aug 5 14:26:50 2019
New Revision: 367930
URL: http://llvm.org/viewvc/llvm-project?rev=367930&view=rev
Log:
[libc++] Accept any non-zero return for .fail.cpp tests
Modified:
libcxx/trunk/utils/libcxx/test/format.py
Modified: libcxx/trunk/utils/libcxx/test/format.py
URL: http://llvm.org/viewvc/llvm-project/libcxx/trunk/utils/libcxx/test/format.py?rev=367930&r1=367929&r2=367930&view=diff
==============================================================================
--- libcxx/trunk/utils/libcxx/test/format.py (original)
+++ libcxx/trunk/utils/libcxx/test/format.py Mon Aug 5 14:26:50 2019
@@ -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
More information about the libcxx-commits
mailing list