[PATCH] D25398: [lit] Use path as test suite name

Brian Gesiak via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 3 16:39:02 PDT 2016


modocache planned changes to this revision.
modocache added subscribers: cmatthews, theraven.
modocache added a comment.

Thanks for the review, @delcypher! I'm going to remove the extraneous ` :: ` and update the tests.



================
Comment at: utils/lit/tests/discovery.py:22
 # CHECK-BASIC-OUT: -- Available Tests --
-# CHECK-BASIC-OUT: sub-suite :: test-one
-# CHECK-BASIC-OUT: sub-suite :: test-two
-# CHECK-BASIC-OUT: top-level-suite :: subdir/test-three
-# CHECK-BASIC-OUT: top-level-suite :: test-one
-# CHECK-BASIC-OUT: top-level-suite :: test-two
+# CHECK-BASIC-OUT: {{.*/discovery}} :: subdir/test-three
+# CHECK-BASIC-OUT: {{.*/discovery}} :: test-one
----------------
delcypher wrote:
> I'm not sure if this is the output that @ddunbar intended. One of the motivations for making this change is so that paths to tests could be copied and pasted and given to lit. If I'm reading these test correctly there's `  ::  ` in between the root path to the test and path to the test in the test suite.
Exactly right! I spoke with @ddunbar today and indeed he suggested I remove this ` :: `. Patch incoming.


================
Comment at: utils/lit/tests/xunit-output.py:8
+# CHECK: <testsuite name='{{.*/test-data}}' tests='1' failures='0'>
+# CHECK: <testcase classname='{{.*/test-data}}.{{.*/test-data}}' name='metrics.ini' time='0.{{[0-9]+}}'/>
 # CHECK: </testsuite>
----------------
delcypher wrote:
> You should probably talk to some of the consumers of this format about this change. A quick `git blame` suggestes that talking to Chris Matthews and David Chisnall about this would be a good place to start.
Great idea, thanks! Chris, David, this diff changes lit to output the absolute path to each test file, instead of `TestSuiteName :: relative/path/to/test`. As a result, this xunit format will become slightly longer. Is this alright?

/cc @cmatthews @theraven


https://reviews.llvm.org/D25398





More information about the llvm-commits mailing list