Skip to contentSkip to conversation

test-runner: fix check for phonesim

PATCH In review James Prestwood 2 participants 3 messages Apr 6, 2022 – Apr 7, 2022

lore
Share & tools
lore

James Prestwood

author
#0 lore raw

PATCH 1/2 test-runner: fix check for phonesim

This got changed to use which, but not updated to remove the list argument.

---
 tools/run-tests | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/run-tests +1 -1
index 78665de1..7e61b6b1 100755
@@ -461,7 +461,7 @@ class TestContext(Namespace):
 			os.environ['IWD_SIM_KEYS'] = sim_keys
 			return
 
-		if not shutil.which('ofonod') or not shutil.which(['phonesim']):
+		if not shutil.which('ofonod') or not shutil.which('phonesim'):
 			print("Ofono or Phonesim not found, skipping test")
 			return
 
Signature · 1 line
2.34.1
author
#1 lore raw

PATCH 2/2 test-runner: resolve --kernel absolute path

This only posed a problem oddly if the kernel binary was in the same directory as test-runner. Resolving the absolute path with the argument parser resolves the issue.

---
 tools/runner.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
tools/runner.py +1 -1
index 1f087d6c..1cb01d29 100644
@@ -183,7 +183,7 @@ class RunnerArgParse(RunnerCoreArgParse):
 				default=None)
 		self.add_argument('--kernel', '-k',
 				metavar='<kernel>',
-				type=str,
+				type=os.path.abspath,
 				help='Path to kernel/uml image',
 				dest='kernel',
 				default=None)
Signature · 1 line
2.34.1
#2 lore raw
In reply to James Prestwood

Hi James,

Quoted 6 lines · James Prestwood

This got changed to use which, but not updated to remove the list argument.

---
  tools/run-tests | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)

Both applied, thanks.

Regards,
-Denis