support/tests: use relative test_dir
authorYann E. MORIN <yann.morin.1998@free.fr>
Tue, 5 Sep 2017 16:21:37 +0000 (18:21 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Tue, 5 Sep 2017 19:09:06 +0000 (21:09 +0200)
When we list the available tests, we use test_dir, which is set from
the path of the script. However, when we run the tests, we use the
hard-coded path.

Ditto to find the config file.

For consistency, always use test_dir.

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Cc: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
support/testing/run-tests

index 95c1565f72dde669561d9fc2b67ed4f56ccbdb3b..ae0bd336b50e4e81a7b125b3de4197dea08369e9 100755 (executable)
@@ -108,8 +108,8 @@ def main():
 
     nose2_args = ["-v",
                   "-N", str(args.testcases),
-                  "-s", "support/testing",
-                  "-c", "support/testing/conf/unittest.cfg"]
+                  "-s", test_dir,
+                  "-c", os.path.join(test_dir, "conf/unittest.cfg")]
 
     if len(args.testname) != 0:
         nose2_args += args.testname