[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

Re: [PATCH] run_tests.py - Restrict values to --server-minor-version.

From: Noorul Islam K M <noorul_at_collab.net>
Date: Tue, 05 Jul 2011 11:47:22 +0530

Daniel Shahaf <d.s_at_daniel.shahaf.name> writes:

> At least this needs cross-referencing comments to svntest/main.py which
> does the same check.
>

I agree. Please find attached updated patch.

> I don't know (and haven't looked) whether it's possible to have direct
> code reuse in this case.
>

I don't think it is possible.

Log
[[[

* build/run_tests.py
  (main): Restrict --server-minor-version to take values in the range
    4-7.

* subversion/tests/cmdline/svntest/main.py
  (_parse_options): Add cross-referencing comment.

Patch by: Noorul Islam K M <noorul{_AT_}collab.net>
]]]

Thanks and Regards
Noorul

Index: subversion/tests/cmdline/svntest/main.py
===================================================================
--- subversion/tests/cmdline/svntest/main.py (revision 1142624)
+++ subversion/tests/cmdline/svntest/main.py (working copy)
@@ -1519,6 +1519,9 @@
     parser.error("'verbose' and 'quiet' are incompatible")
   if options.fsfs_packing and not options.fsfs_sharding:
     parser.error("--fsfs-packing requires --fsfs-sharding")
+
+ # If you change the below condition then change in
+ # ../../../../build/run_tests.py too.
   if options.server_minor_version < 4 or options.server_minor_version > 7:
     parser.error("test harness only supports server minor versions 4-7")
 
Index: build/run_tests.py
===================================================================
--- build/run_tests.py (revision 1142624)
+++ build/run_tests.py (working copy)
@@ -604,6 +604,14 @@
     logfile = os.path.abspath('tests.log')
     faillogfile = os.path.abspath('fails.log')
 
+ # If you change the below condition then change in
+ # ../subversion/tests/cmdline/svntest/main.py too.
+ if server_minor_version:
+ minor_version = int(server_minor_version)
+ if minor_version < 4 or minor_version > 7:
+ sys.stderr.write("Test harness only supports server minor versions 4-7\n")
+ sys.exit(1)
+
   th = TestHarness(args[0], args[1], logfile, faillogfile,
                    base_url, fs_type, http_library, server_minor_version,
                    verbose, cleanup, enable_sasl, parallel, config_file,
Received on 2011-07-05 08:19:54 CEST

This is an archived mail posted to the Subversion Dev mailing list.