This is an archive of the discontinued Mercurial Phabricator instance.

run-tests: update the test case name format
ClosedPublic

Authored by lothiraldan on May 13 2018, 5:28 PM.

Details

Summary

Manually typing parenthesis and spaces will be tedious when trying to launch a
specific test case.

I'm proposing a simpler format that is less hard to remember and type right.
There was other possibilities envisaged like :: or !, I think # is
slight easier to type but I'm open to any suggestion on the new format.

Diff Detail

Repository
rHG Mercurial
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

lothiraldan created this revision.May 13 2018, 5:28 PM
quark accepted this revision.May 14 2018, 7:24 PM
quark added a subscriber: quark.

I like this change. Didn't realize it's this simple. Marking as accetped.

pulkit accepted this revision.May 17 2018, 2:37 PM

Getting this test failure at the tip of hg-committed with this series applied, can you have a look?

--- /home/foobar/repo/pushaccess/tests/test-run-tests.t
+++ /home/foobar/repo/pushaccess/tests/test-run-tests.t.err
@@ -1634,9 +1634,24 @@
    #endif
   
   ERROR: test-cases-abc.t#B output changed
-  !
+  !.
+  --- $TESTTMP/anothertests/cases/test-cases-abc.t
+  +++ $TESTTMP/anothertests/cases/test-cases-abc.t.B.err
+  @@ -7,7 +7,7 @@
+     $ V=C
+   #endif
+     $ echo $V | sed 's/A/C/'
+  -  C
+  +  B
+   #if C
+     $ [ $V = C ]
+   #endif
+  
+  ERROR: test-cases-abc.t#B output changed
+  !.
   Failed test-cases-abc.t#B: output changed
-  # Ran 1 tests, 0 skipped, 1 failed.
+  Failed test-cases-abc.t#B: output changed
+  # Ran 4 tests, 0 skipped, 2 failed.
   python hash seed: * (glob)
   [1]
 

ERROR: test-run-tests.t output changed
lothiraldan updated this revision to Diff 8868.May 22 2018, 7:48 AM

I fixed the issue, it was a last minute style fix that turns out to not be equivalent to the previous code.

Anyway, here is the updated version that was rebased on top of hg-commited.

durin42 accepted this revision.Jun 4 2018, 6:23 PM
This revision is now accepted and ready to land.Jun 4 2018, 6:23 PM
This revision was automatically updated to reflect the committed changes.