]> git.ipfire.org Git - thirdparty/hostap.git/commitdiff
tests: Remove the 'test_' prefix from test module names
authorJouni Malinen <jouni@qca.qualcomm.com>
Thu, 31 Oct 2013 09:47:43 +0000 (11:47 +0200)
committerJouni Malinen <j@w1.fi>
Thu, 31 Oct 2013 09:49:58 +0000 (11:49 +0200)
This is unnecessary extra complexity for user, so use the 'test_' prefix
only internally within the python scripts and file names.

Signed-hostap: Jouni Malinen <jouni@qca.qualcomm.com>

tests/hwsim/README
tests/hwsim/run-all.sh
tests/hwsim/run-tests.py

index 56613acd6f9d7b0decd0ba0fbccc48fec61a3c61..dd4dcae1791d5bc5e73fa4dd08248aabf3f3acd6 100644 (file)
@@ -151,10 +151,10 @@ For manual testing, ./start.sh can be used to initialize interfaces and
 programs and run-tests.py to execute one or more test
 cases. run-tests.py output verbosity can be controlled with -d (more
 verbose debug output) and -q (less verbose output) on the command
-line. "-f <test_filename(without.py)>" can be used to specify that all
-test cases from a single file are to be run. Test name as the last
-command line argument can be specified that a single test case is to be
-run (e.g., "./run-tests.py ap_pmf_required").
+line. "-f <module name>" (pointing to file test_<module name>.py) can be
+used to specify that all test cases from a single file are to be
+run. Test name as the last command line argument can be specified that a
+single test case is to be run (e.g., "./run-tests.py ap_pmf_required").
 
 
 Adding/modifying test cases
index 47daa9ab4701ccca98e9c2dd1b68f0b134212e7a..126380e6271c646639d728465d45c38571169b4a 100755 (executable)
@@ -24,12 +24,12 @@ fi
 if [ "x$1" = "xconcurrent-valgrind" ]; then
        VALGRIND=valgrind
        CONCURRENT=concurrent
-       CONCURRENT_TESTS="-f test_p2p_autogo test_p2p_discovery test_p2p_grpform"
+       CONCURRENT_TESTS="-f p2p_autogo p2p_discovery p2p_grpform"
        SUFFIX=-concurrent-valgrind
        shift
 elif [ "x$1" = "xconcurrent" ]; then
        CONCURRENT=concurrent
-       CONCURRENT_TESTS="-f test_p2p_autogo test_p2p_discovery test_p2p_grpform"
+       CONCURRENT_TESTS="-f p2p_autogo p2p_discovery p2p_grpform"
        unset VALGRIND
        SUFFIX=-concurrent
        shift
index 0fd7d2319f06eedd1877d9e7de9c0c8c78186db1..9908dc569af1fe4f7522dcee7e39d5ec8825ed45 100755 (executable)
@@ -81,7 +81,7 @@ def main():
         if m:
             logger.debug("Import test cases from " + t)
             mod = __import__(m.group(1))
-            test_modules.append(mod.__name__)
+            test_modules.append(mod.__name__.replace('test_', '', 1))
             for s in dir(mod):
                 if s.startswith("test_"):
                     func = mod.__dict__.get(s)
@@ -214,7 +214,7 @@ def main():
             if not name in args.tests:
                 continue
         if args.testmodules:
-            if not t.__module__ in args.testmodules:
+            if not t.__module__.replace('test_', '', 1) in args.testmodules:
                 continue
         with DataCollector(args.logdir, name, args.tracing, args.dmesg):
             logger.info("START " + name)