You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@couchdb.apache.org by da...@apache.org on 2014/08/12 19:46:52 UTC

couchdb commit: updated refs/heads/windsor-merge to 73ca1f9

Repository: couchdb
Updated Branches:
  refs/heads/windsor-merge 96e25e6ae -> 73ca1f9c5


Allow tests runs to start at a given file

If you're running this using ./dev/run you need to use the -- to stop
option processing by ./dev/run like so:

    ./dev/run -- test/javascript/run --start path/to/file/start.js


Project: http://git-wip-us.apache.org/repos/asf/couchdb/repo
Commit: http://git-wip-us.apache.org/repos/asf/couchdb/commit/73ca1f9c
Tree: http://git-wip-us.apache.org/repos/asf/couchdb/tree/73ca1f9c
Diff: http://git-wip-us.apache.org/repos/asf/couchdb/diff/73ca1f9c

Branch: refs/heads/windsor-merge
Commit: 73ca1f9c575b65ac5b805605dbae08b49ace7a46
Parents: 96e25e6
Author: Paul J. Davis <pa...@gmail.com>
Authored: Tue Aug 12 12:45:54 2014 -0500
Committer: Paul J. Davis <pa...@gmail.com>
Committed: Tue Aug 12 12:45:54 2014 -0500

----------------------------------------------------------------------
 test/javascript/run | 13 ++++++++++++-
 1 file changed, 12 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/couchdb/blob/73ca1f9c/test/javascript/run
----------------------------------------------------------------------
diff --git a/test/javascript/run b/test/javascript/run
index ac14112..883fd37 100755
--- a/test/javascript/run
+++ b/test/javascript/run
@@ -95,7 +95,10 @@ def run_couchjs(test, fmt):
 
 
 def options():
-    return []
+    return [
+        op.make_option("-s", "--start", metavar="FILENAME", default=None,
+            help="Start from the given filename if multiple files are passed")
+    ]
 
 
 def main():
@@ -119,6 +122,14 @@ def main():
             else:
                 sys.stderr.write("Unknown test: " + name + os.linesep)
                 exit(1)
+
+    if opts.start is not None:
+        tmp = []
+        for name in tests:
+            if name >= opts.start:
+                tmp.append(name)
+        tests = tmp
+
     fmt = mkformatter(tests)
     for test in tests:
         run_couchjs(test, fmt)