[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

[tor-commits] [stem/master] Dropping support for a --config argument



commit 5ccfcfcc1827e38901754dd3fab20c3f9dcba42b
Author: Damian Johnson <atagar@xxxxxxxxxxxxxx>
Date:   Thu Apr 11 08:50:20 2013 -0700

    Dropping support for a --config argument
    
    Lets face it, no one ever uses this. I doubt anyone besides me even knows
    *what* the hell it even does. Dropping this will let us simplify the test
    runner quite a bit.
---
 run_tests.py      |   17 +++--------------
 test/settings.cfg |    1 -
 2 files changed, 3 insertions(+), 15 deletions(-)

diff --git a/run_tests.py b/run_tests.py
index 42ff22e..92c40ab 100755
--- a/run_tests.py
+++ b/run_tests.py
@@ -25,8 +25,8 @@ import test.output
 import test.runner
 import test.static_checks
 
-OPT = "auist:l:c:h"
-OPT_EXPANDED = ["all", "unit", "integ", "style", "python3", "clean", "targets=", "test=", "log=", "tor=", "config=", "help"]
+OPT = "auist:l:h"
+OPT_EXPANDED = ["all", "unit", "integ", "style", "python3", "clean", "targets=", "test=", "log=", "tor=", "help"]
 DIVIDER = "=" * 70
 
 CONFIG = stem.util.conf.config_dict("test", {
@@ -74,7 +74,7 @@ def load_user_configuration(test_config):
   fails.
   """
 
-  arg_overrides, config_path = {}, None
+  arg_overrides = {}
 
   try:
     opts = getopt.getopt(sys.argv[1:], OPT, OPT_EXPANDED)[0]
@@ -97,8 +97,6 @@ def load_user_configuration(test_config):
       arg_overrides["argument.python3"] = "true"
     elif opt == "--clean":
       arg_overrides["argument.python3_clean"] = "true"
-    elif opt in ("-c", "--config"):
-      config_path = os.path.abspath(arg)
     elif opt in ("-t", "--targets"):
       integ_targets = arg.split(",")
 
@@ -139,15 +137,6 @@ def load_user_configuration(test_config):
 
       sys.exit()
 
-  # load a testrc if '--config' was given, then apply arguments
-
-  if config_path:
-    try:
-      test_config.load(config_path)
-    except IOError, exc:
-      print "Unable to load testing configuration at '%s': %s" % (config_path, exc)
-      sys.exit(1)
-
   for key, value in arg_overrides.items():
     test_config.set(key, value)
 
diff --git a/test/settings.cfg b/test/settings.cfg
index cebee31..372ce33 100644
--- a/test/settings.cfg
+++ b/test/settings.cfg
@@ -83,7 +83,6 @@ msg.help
 |  -l, --log RUNLEVEL    includes logging output with test results, runlevels:
 |                          TRACE, DEBUG, INFO, NOTICE, WARN, ERROR
 |      --tor PATH        custom tor binary to run testing against
-|  -c, --config PATH     path to a custom test configuration
 |  -h, --help            presents this help
 |
 |  Examples:



_______________________________________________
tor-commits mailing list
tor-commits@xxxxxxxxxxxxxxxxxxxx
https://lists.torproject.org/cgi-bin/mailman/listinfo/tor-commits