Skip to content

Commit 5ac1b1e

Browse files
matttbekuba-moo
authored andcommitted
contest: vm: get 'tree_path' config only once
'tree_path' config is fetched at the init phase, no need to get it again later, simply use self.tree_path. Signed-off-by: Matthieu Baerts (NGI0) <[email protected]>
1 parent 48fb347 commit 5ac1b1e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

contest/remote/lib/vm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,12 +116,11 @@ def _get_ksft_timeout(self):
116116
default_timeout = 45 # from tools/testing/selftests/kselftest/runner.sh
117117

118118
targets = self.config.get('ksft', 'target', fallback=None)
119-
tree_path = self.config.get('local', 'tree_path', fallback=None)
120-
if not targets or not tree_path:
119+
if not targets:
121120
return default_timeout
122121
target = targets.split()[0]
123122

124-
settings_path = f'{tree_path}/tools/testing/selftests/{target}/settings'
123+
settings_path = f'{self.tree_path}/tools/testing/selftests/{target}/settings'
125124
if not os.path.isfile(settings_path):
126125
return default_timeout
127126

0 commit comments

Comments
 (0)