alive2test.py should check absence of 'ERROR: ..' too
ADD
tests/alive-tv/failcheck.src.ll
+define i8 @src() {
+ret i8 0
+}
+
+define i8 @tgt() {
+ret i8 1
+}
+
+; XFAIL: Value mismatch

ADD
tests/alive-tv/failcheck.tgt.ll
+define i8 @src() {
+ret i8 0
+}
+
+define i8 @tgt() {
+ret i8 2
+}

MODIFY
tests/lit/lit/formats/alive2test.py
tests/lit/lit/formats/alive2test.py
@@ -41,6 +41,7 @@ class Alive2Test(TestFormat):
self.regex_xfail = re.compile(r";\s*XFAIL:\s*(.*)")
self.regex_args = re.compile(r";\s*TEST-ARGS:(.*)")
self.regex_check = re.compile(r";\s*CHECK:(.*)")
+ self.regex_errs_out = re.compile("ERROR:.*")
def getTestsInDirectory(self, testSuite, path_in_suite,
litConfig, localConfig):
@@ -111,14 +112,15 @@ class Alive2Test(TestFormat):
return lit.Test.FAIL, out + err
if expect_err is None and xfail is None:
- if exitCode == 0 and (out + err).find(ok_string) != -1:
+ if exitCode == 0 and (out + err).find(ok_string) != -1 and \
+ self.regex_errs_out.search(out + err) is None:
return lit.Test.PASS, ''
return lit.Test.FAIL, out + err
if expect_err != None and (out + err).find(expect_err.group(1)) != -1:
return lit.Test.PASS, ''
- if xfail != None and err.find(xfail.group(1)) != -1:
+ if xfail != None and (out + err).find(xfail.group(1)) != -1:
return lit.Test.XFAIL, ''
return lit.Test.FAIL, out + err

alive2test.py should check absence of 'ERROR: ..' too (#328)