diff --git a/tests/lit/lit/formats/alive2test.py b/tests/lit/lit/formats/alive2test.py index 1675d540e..400a1090c 100644 --- a/tests/lit/lit/formats/alive2test.py +++ b/tests/lit/lit/formats/alive2test.py @@ -128,9 +128,10 @@ def execute(self, test, litConfig): if output.find(chk.strip()) == -1: return lit.Test.FAIL, output - chk_not = self.regex_check_not.search(input) - if chk_not != None and output.find(chk_not.group(1).strip()) != -1: - return lit.Test.FAIL, output + chk_not = self.regex_check_not.findall(input) + for chk in chk_not: + if output.find(chk.strip()) != -1: + return lit.Test.FAIL, output if clang_tv and exitCode != 0: # clang tv should not exit with non-zero even if validation fails. @@ -139,7 +140,7 @@ def execute(self, test, litConfig): expect_err = self.regex_errs.search(input) if expect_err is None and xfail is None and len(chks) == 0 and \ - chk_not is None: + len(chk_not) == 0: # If there's no other test, correctness of the transformation should be # checked. if exitCode == 0 and output.find(ok_string) != -1 and \