Open aaaaalbert opened 10 years ago
Unfortunately, Windows doesn't seem to spawn the subprocess unless we close stdin / stdout. This means we can't trivially monitor the subprocess for errors. See SeattleTestbed/seash@26cf2702be2872810b4d60f9e3d43837d14db054 that attempted to introduce monitoring to a seash
unit test, and SeattleTestbed/seash@37637ba1cebe1a98481ed4a2ad668a771fea9757 that removed it subsequently due to the Windows issue described above.
When running unit tests that employ a
ut_MODULE_subprocess.py
orut_MODULE_setup.py
script, an error in these scripts does not hinderutf.py
to try to run other test files following the assumed initialization / setup. In the "best" case, the subsequent tests will fail and report so, in the worst case, the tests will wait for a precondition to be fulfilled by init / setup, and thus hang indefinitely. (See SeattleTestbed/seash#80 for an example of the latter).utf
should usesubprocess.communicate()
to check for errors in any processes it spawns, and stop if errors are encountered. Similarly, anyut_MODULE_subprocess
scripts need to check for (and raise) errors ofut_MODULE_setup
scripts they spawn.