Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit d9fa506

Browse files
committed
test: do not to append directory to the executable path (opt-in)
Signed-off-by: Jan Michalski <jan.michalski@intel.com>
1 parent 42950e2 commit d9fa506

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/test/unittest/context.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
# SPDX-License-Identifier: BSD-3-Clause
2-
# Copyright 2019-2023, Intel Corporation
2+
# Copyright 2019-2024, Intel Corporation
33
#
44

55
"""
@@ -290,7 +290,7 @@ def new_poolset(self, path):
290290
return _Poolset(path, self)
291291

292292
def exec(self, cmd, *args, expected_exitcode=0, stderr_file=None,
293-
stdout_file=None, std_input=None):
293+
stdout_file=None, std_input=None, cmd_requires_cwd=True):
294294
"""
295295
Execute binary in the current test context as a separate process.
296296
@@ -320,8 +320,8 @@ def exec(self, cmd, *args, expected_exitcode=0, stderr_file=None,
320320
# change cmd into list for supbrocess type compliance
321321
cmd = [cmd, ]
322322

323-
cmd[0] = os.path.join(self.cwd, cmd[0]) + \
324-
self.build.exesuffix
323+
if cmd_requires_cwd:
324+
cmd[0] = os.path.join(self.cwd, cmd[0]) + self.build.exesuffix
325325

326326
if self.valgrind:
327327
cmd = self.valgrind.cmd + cmd

0 commit comments

Comments
 (0)