test/lit.cfg: Add .xfail.pass.cpp, to expect compiling successfully and to fail to run.
This commit is contained in:
		| @@ -43,6 +43,7 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): | |||||||
|         # Check what kind of test this is. |         # Check what kind of test this is. | ||||||
|         assert name.endswith('.pass.cpp') or name.endswith('.fail.cpp') |         assert name.endswith('.pass.cpp') or name.endswith('.fail.cpp') | ||||||
|         expected_compile_fail = name.endswith('.fail.cpp') |         expected_compile_fail = name.endswith('.fail.cpp') | ||||||
|  |         expected_run_fail = name.endswith('.xfail.pass.cpp') | ||||||
|  |  | ||||||
|         # If this is a compile (failure) test, build it and check for failure. |         # If this is a compile (failure) test, build it and check for failure. | ||||||
|         if expected_compile_fail: |         if expected_compile_fail: | ||||||
| @@ -84,6 +85,11 @@ class LibcxxTestFormat(lit.formats.FileBasedTest): | |||||||
|  |  | ||||||
|                 cmd = [exec_path] |                 cmd = [exec_path] | ||||||
|                 out, err, exitCode = self.execute_command(cmd) |                 out, err, exitCode = self.execute_command(cmd) | ||||||
|  |                 if expected_run_fail: | ||||||
|  |                     if (exitCode != 0): | ||||||
|  |                         return lit.Test.XFAIL, "" | ||||||
|  |                     else: | ||||||
|  |                         return lit.Test.XPASS, "" | ||||||
|                 if exitCode != 0: |                 if exitCode != 0: | ||||||
|                     report = """Compiled With: %s\n""" % ' '.join(["'%s'" % a |                     report = """Compiled With: %s\n""" % ' '.join(["'%s'" % a | ||||||
|                                                                    for a in compile_cmd]) |                                                                    for a in compile_cmd]) | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 NAKAMURA Takumi
					NAKAMURA Takumi