Patchwork [4,of,8] test-revert: display the list of all generated cases

login
register
mail settings
Submitter Pierre-Yves David
Date Aug. 11, 2014, 6:39 p.m.
Message ID <0bd30f8195ca0c6b29d5.1407782390@marginatus.alto.octopoid.net>
Download mbox | patch
Permalink /patch/5346/
State Accepted
Headers show

Comments

Pierre-Yves David - Aug. 11, 2014, 6:39 p.m.
# HG changeset patch
# User Pierre-Yves David <pierre-yves.david@fb.com>
# Date 1403713458 -3600
#      Wed Jun 25 17:24:18 2014 +0100
# Node ID 0bd30f8195ca0c6b29d5f203f47ec5ff62ece8a5
# Parent  1220257fd25d7dce14954c2cc316a8276a5659dc
test-revert: display the list of all generated cases

This will help to track all existing cases.

(still very simple now)

Patch

diff --git a/tests/test-revert.t b/tests/test-revert.t
--- a/tests/test-revert.t
+++ b/tests/test-revert.t
@@ -458,11 +458,13 @@  Write the python script to disk
   > 
   > # compute file content
   > content = []
   > for filename, ctxkey, wckey in combination:
   >     cc = ctxcontent[ctxkey]
-  >     if target == 'base':
+  >     if target == 'filelist':
+  >         print filename
+  >     elif target == 'base':
   >         content.append((filename, cc[0]))
   >     elif target == 'parent':
   >         content.append((filename, cc[1]))
   >     elif target == 'wc':
   >         content.append((filename, wccontent[wckey](cc)))
@@ -475,10 +477,15 @@  Write the python script to disk
   >     f = open(filename, 'w')
   >     f.write(data + '\n')
   >     f.close()
   > EOF
 
+check list of planned files
+
+  $ python gen-revert-cases.py filelist
+  modified_clean
+
 Script to make a simple text version of the content
 ---------------------------------------------------
 
   $ cat << EOF >> dircontent.py
   > # generate a simple text view of the directoty for easy comparison