Unify lit.cfg.py approach (#2249)

On #2224 @zygoloid pointed out we needed --implicit-check-not to ensure we were correctly matching output. This is the standard way we're writing explorer tests, so I was looking at unifying our lit approaches.

This is one take on it, making more use of substitutions to bring various testing into alignment, as well as symlinks to avoid config skew (maybe I'll eventually figure out a better solution than symlinks).

Makes a couple small fixes in explorer to remove end-of-line whitespace on output.
This commit is contained in:
Jon Ross-Perkins
2022-10-06 12:25:23 -07:00
committed by GitHub
parent 495d75a394
commit b9d3d9a3df
523 changed files with 1778 additions and 2847 deletions
+13 -14
View File
@@ -2,25 +2,24 @@
// Exceptions. See /LICENSE for license information.
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
//
// RUN: %{explorer} --parser_debug --trace_file=- %s 2>&1 | \
// RUN: %{FileCheck} --match-full-lines --allow-unused-prefixes %s
// RUN: %{explorer-trace} %s 2>&1 | %{FileCheck-allow-unmatched} %s
//
// A lot of output is elided: this is only checking for a few things for simple
// sanity checking on --parser_debug --trace_file=- output.
//
// NOAUTOUPDATE
// CHECK: ********** source program **********
// CHECK: interface ImplicitAs {
// CHECK: ********** type checking **********
// CHECK: ** declaring interface ImplicitAs
// CHECK: ********** resolving unformed variables **********
// CHECK: ********** printing declarations **********
// CHECK: interface ImplicitAs {
// CHECK: ********** starting execution **********
// CHECK: ********** initializing globals **********
// CHECK: ********** calling main function **********
// CHECK: --- step exp Main() .0. (<Main()>:0) --->
// CHECK: result: 0
// CHECK:********** source program **********
// CHECK:interface ImplicitAs {
// CHECK:********** type checking **********
// CHECK:** declaring interface ImplicitAs
// CHECK:********** resolving unformed variables **********
// CHECK:********** printing declarations **********
// CHECK:interface ImplicitAs {
// CHECK:********** starting execution **********
// CHECK:********** initializing globals **********
// CHECK:********** calling main function **********
// CHECK:--- step exp Main() .0. (<Main()>:0) --->
// CHECK:result: 0
package ExplorerTest api;