Created
September 29, 2015 13:42
-
-
Save vedranmiletic/5d90da9aed330f345acd to your computer and use it in GitHub Desktop.
Add -M option to test.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/test.py b/test.py | |
--- a/test.py | |
+++ b/test.py | |
@@ -1122,7 +1122,14 @@ | |
example_names_original, | |
python_tests) | |
- for module in NS3_ENABLED_MODULES: | |
+ # User can specify which modules to test | |
+ if options.modules == "*": | |
+ enabled_modules = NS3_ENABLED_MODULES[:] | |
+ else: | |
+ specified_modules = options.modules.split(",") | |
+ enabled_modules = ["ns3-" + module_name for module_name in specified_modules] | |
+ | |
+ for module in enabled_modules: | |
# Remove the "ns3-" from the module name. | |
module = module[len("ns3-"):] | |
@@ -1882,6 +1889,10 @@ | |
parser.add_option("-m", "--multiple", action="store_true", dest="multiple", default=False, | |
help="report multiple failures from test suites and test cases") | |
+ parser.add_option("-M", "--modules", action="store", type="string", dest="modules", default="*", | |
+ metavar="MODULES", | |
+ help="comma separated list of modules from which test suites will be used") | |
+ | |
parser.add_option("-n", "--nowaf", action="store_true", dest="nowaf", default=False, | |
help="do not run waf before starting testing") | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment