[tor-commits] [stem/master] Adding a '--all' argument to the tests

atagar at torproject.org atagar at torproject.org
Thu Jan 10 04:32:06 UTC 2013


commit c88e3da8c481dfc4e726a5e3d69bc19ffffddb57
Author: Damian Johnson <atagar at torproject.org>
Date:   Wed Jan 9 20:20:28 2013 -0800

    Adding a '--all' argument to the tests
    
    It'll be a whole lot easier to ask patch submitters to run 'run_tests.py --all'
    rather than 'run_tests.py --unit --integ --style'. :)
---
 run_tests.py      |   10 +++++++---
 test/settings.cfg |    1 +
 2 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 9e6f5e1..0edb785 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -69,8 +69,8 @@ import test.integ.util.proc
 import test.integ.util.system
 import test.integ.version
 
-OPT = "uist:l:c:h"
-OPT_EXPANDED = ["unit", "integ", "style", "targets=", "test=", "log=", "tor=", "config=", "help"]
+OPT = "auist:l:c:h"
+OPT_EXPANDED = ["all", "unit", "integ", "style", "targets=", "test=", "log=", "tor=", "config=", "help"]
 DIVIDER = "=" * 70
 
 CONFIG = stem.util.conf.config_dict("test", {
@@ -187,7 +187,11 @@ def load_user_configuration(test_config):
     arg_overrides["argument.no_color"] = "true"
 
   for opt, arg in opts:
-    if opt in ("-u", "--unit"):
+    if opt in ("-a", "--all"):
+      arg_overrides["argument.unit"] = "true"
+      arg_overrides["argument.integ"] = "true"
+      arg_overrides["argument.style"] = "true"
+    elif opt in ("-u", "--unit"):
       arg_overrides["argument.unit"] = "true"
     elif opt in ("-i", "--integ"):
       arg_overrides["argument.integ"] = "true"
diff --git a/test/settings.cfg b/test/settings.cfg
index 401b869..c87781f 100644
--- a/test/settings.cfg
+++ b/test/settings.cfg
@@ -74,6 +74,7 @@ msg.help
 |Usage runTests.py [OPTION]
 |Runs tests for the stem library.
 |
+|  -a, --all             runs unit, integ, and style checks (same as '-uis')
 |  -u, --unit            runs unit tests
 |  -i, --integ           runs integration tests
 |  -s, --style           runs style checker





More information about the tor-commits mailing list