Revert "Make verbose testing also report compile/trace/run messages."

This reverts commit d8db41b3b6.

These printouts didn't interoperate well with the reporting structure
since they printed out "immediately" rather than being retained in a
string in the TestResult. Doing so would defeat the purpose though,
because they were being used to determine timing to debug
https://github.com/llvm/mlir-npcomp/issues/287

I think these are best done as local modification when debugging a
particular issue, or we can invest in tracing annotations. Soon these
will all run in parallel, so it makes even less sense to have immediate
printouts.
pull/292/head
Sean Silva 2021-08-27 18:01:08 +00:00
parent d6b9709fa5
commit 1c53424fe7
2 changed files with 3 additions and 11 deletions

View File

@ -104,11 +104,10 @@ def main():
sys.exit(1)
# Run the tests.
results = run_tests(tests, config, verbose=args.verbose)
results = run_tests(tests, config)
# Report the test results.
failed = report_results(
results, XFAIL_SETS[args.config], verbose=args.verbose)
failed = report_results(results, XFAIL_SETS[args.config], args.verbose)
sys.exit(1 if failed else 0)
if __name__ == '__main__':

View File

@ -284,16 +284,13 @@ def generate_golden_trace(test: Test) -> Trace:
return trace
def run_tests(tests: List[Test], config: TestConfig,
verbose=False) -> List[TestResult]:
def run_tests(tests: List[Test], config: TestConfig) -> List[TestResult]:
"""Invoke the given `Test`'s with the provided `TestConfig`."""
results = []
for test in tests:
# TODO: Precompile everything in parallel.
try:
print(f"GENERATE TRACE: {test}")
golden_trace = generate_golden_trace(test)
print(f"COMPILE: {test}")
compiled = config.compile(test.program_factory())
except Exception as e:
# Useful for debugging:
@ -310,11 +307,7 @@ def run_tests(tests: List[Test], config: TestConfig,
golden_trace=None))
continue
# TODO: Run in parallel.
if verbose:
print(f"RUN: {test}")
trace = config.run(compiled, golden_trace)
if verbose:
print(f"FINISHED: {test}")
results.append(
TestResult(unique_name=test.unique_name,
compilation_error=None,