This lets us run the test suite against a different configuration
file, likely pointing at a different S3 clone storage service.
... | ... |
@@ -27,6 +27,7 @@ run_tests = [] |
27 | 27 |
exclude_tests = [] |
28 | 28 |
|
29 | 29 |
verbose = False |
30 |
+configfile = None |
|
30 | 31 |
|
31 | 32 |
if os.name == "posix": |
32 | 33 |
have_wget = True |
... | ... |
@@ -178,6 +179,9 @@ def test_s3cmd(label, cmd_args = [], **kwargs): |
178 | 178 |
if not cmd_args[0].endswith("s3cmd"): |
179 | 179 |
cmd_args.insert(0, "python2") |
180 | 180 |
cmd_args.insert(1, "s3cmd") |
181 |
+ if configfile: |
|
182 |
+ cmd_args.insert(2, "-c") |
|
183 |
+ cmd_args.insert(3, configfile) |
|
181 | 184 |
|
182 | 185 |
return test(label, cmd_args, **kwargs) |
183 | 186 |
|
... | ... |
@@ -238,6 +242,10 @@ while argv: |
238 | 238 |
print "%s A B K..O -N" % sys.argv[0] |
239 | 239 |
print "Run tests number A, B and K through to O, except for N" |
240 | 240 |
sys.exit(0) |
241 |
+ |
|
242 |
+ if arg in ("-c", "--config"): |
|
243 |
+ configfile = argv.pop(0) |
|
244 |
+ continue |
|
241 | 245 |
if arg in ("-l", "--list"): |
242 | 246 |
exclude_tests = range(0, 999) |
243 | 247 |
break |