Fix run item and batch mode robustness
- run item: rename tum_fime→tum, remove stdout=PIPE (deadlock with
spawn), support batch mode (-b), SUCCESS on any completed subprocess
regardless of sub-test result
- batch.py: fix control("loaded") deadlock via daemon thread + Event +
is_alive() polling; fix premature finish on gd_update messages;
propagate success flag from finished message; guard control("close")
- process.py: include success flag in send_finished message
- py_process/lua_process: add stdout/stderr=DEVNULL to Popen
- test_run.py: fix finished detection ("id" in m and m["id"] is None)
- testium_win.py: track run_exit_code, SIGABRT handler, clean exit
- __init__.py: sys.exit with batch success flag
- Add run item validation tests and CLAUDE.md documentation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1
test/validation/items/run/param.yaml
Normal file
1
test/validation/items/run/param.yaml
Normal file
@@ -0,0 +1 @@
|
||||
no_param: Null
|
||||
7
test/validation/items/run/sub_fail.tum
Normal file
7
test/validation/items/run/sub_fail.tum
Normal file
@@ -0,0 +1,7 @@
|
||||
main:
|
||||
name: run sub-test (always fail)
|
||||
steps:
|
||||
- check:
|
||||
name: fail
|
||||
values:
|
||||
- false
|
||||
7
test/validation/items/run/sub_pass.tum
Normal file
7
test/validation/items/run/sub_pass.tum
Normal file
@@ -0,0 +1,7 @@
|
||||
main:
|
||||
name: run sub-test (always pass)
|
||||
steps:
|
||||
- check:
|
||||
name: pass
|
||||
values:
|
||||
- true
|
||||
25
test/validation/items/run/test.tum
Normal file
25
test/validation/items/run/test.tum
Normal file
@@ -0,0 +1,25 @@
|
||||
# run item: launches a .tum file in a new testium instance.
|
||||
# In batch mode the sub-instance runs with -b; in GUI mode with -r.
|
||||
# The run item result is SUCCESS if the sub-instance launched successfully,
|
||||
# regardless of its own test result.
|
||||
|
||||
- run:
|
||||
name: run PASS (valid file, passing sub-test)
|
||||
key: $(test)_PASS
|
||||
tum: $(test_path)$(psep)sub_pass.tum
|
||||
|
||||
- run:
|
||||
name: run PASS (valid file, failing sub-test)
|
||||
key: $(test)_PASS
|
||||
tum: $(test_path)$(psep)sub_fail.tum
|
||||
|
||||
- run:
|
||||
name: run FAIL (file not found)
|
||||
key: $(test)_FAIL
|
||||
tum: $(test_path)$(psep)non_existent.tum
|
||||
|
||||
- run:
|
||||
name: run FAIL (wait_for_exec without time window)
|
||||
key: $(test)_FAIL
|
||||
tum: $(test_path)$(psep)sub_pass.tum
|
||||
wait_for_exec: true
|
||||
Reference in New Issue
Block a user