Skip to contentSkip to conversation

support/tests: use relative test_dir

PATCH New Yann E. MORIN 2 participants 3 messages Sep 5, 2017

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 support/tests: use relative test_dir

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.

Cc Thomas Petazzoni <[email protected]>
Cc Ricardo Martincoski <[email protected]>
---
 support/testing/run-tests | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
support/testing/run-tests +2 -2
index 95c1565f72..ae0bd336b5 100755
@@ -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
Signature · 1 line
2.11.0
#1 lore raw

PATCH 1/1 support/tests: use relative test_dir

Hello,

Quoted 6 lines · Yann E. MORIN

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.

Quoted 8 lines

For consistency, always use test_dir.

Cc Thomas Petazzoni <[email protected]>
Cc Ricardo Martincoski <[email protected]>
---
 support/testing/run-tests | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 support/tests: use relative test_dir

In reply to Yann E. MORIN

Hello,

Quoted 6 lines · Yann E. MORIN

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.

Quoted 8 lines

For consistency, always use test_dir.

Cc Thomas Petazzoni <[email protected]>
Cc Ricardo Martincoski <[email protected]>
---
 support/testing/run-tests | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com