Skip to content

Commit 1507937

Browse files
committed
[ot] python/qemu: ot.pyot.executer: fix late variable definition issue
_build_test_command may throw an exception before 'pre' context is actually executed. Signed-off-by: Emmanuel Blot <[email protected]>
1 parent 180c643 commit 1507937

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

python/qemu/ot/pyot/executer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,10 +192,10 @@ def run(self, debug: bool, allow_no_test: bool) -> int:
192192
'UTFILE': basename(test),
193193
})
194194
self._log.info('[TEST %s] (%d/%d)', test_name, tpos, tcount)
195+
context = 'pre'
195196
exec_info = self._build_test_command(test)
196197
exec_info.test_name = test_name
197198
vcplogfile = self._log_vcp_streams(exec_info)
198-
context = 'pre'
199199
exec_info.context.execute(context)
200200
context = 'with'
201201
tret, xtime, err = qot.run(exec_info)

0 commit comments

Comments
 (0)