couchdb-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rnew...@apache.org
Subject [13/23] couchdb commit: updated refs/heads/master to aa9f32d
Date Thu, 28 Aug 2014 12:37:35 GMT
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/master
Commit: 73ca1f9c575b65ac5b805605dbae08b49ace7a46
Parents: 96e25e6
Author: Paul J. Davis <paul.joseph.davis@gmail.com>
Authored: Tue Aug 12 12:45:54 2014 -0500
Committer: Paul J. Davis <paul.joseph.davis@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)


Mime
View raw message