mirror of
https://github.com/ArduPilot/ardupilot.git
synced 2026-10-23 02:55:47 +08:00
run_in_terminal_window.sh's headless fallback logs the vehicle console to a hardcoded /tmp/$name.log. Every instance and every user on the machine gets the same path. Concurrent instances overwrite each other's logs, and on a multi-user machine a second user can't write the file at all (/tmp is sticky and fs.protected_regular blocks the open). The redirect fails before the binary is exec'd, the script exits 0 anyway, and SITL never comes up, with no error output anywhere. Two tests: the log goes to TMPDIR when it is set, and still goes to /tmp when it isn't. The TMPDIR test fails until the next commit fixes the script. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Tests
Caution
pytest tests/will be run in GitHub Actions.
All Python files in this directory that meet pytest discovery rules will be examined by pytest and all tests that it finds will be run.
Files of the form test_*.py or *_test.py should avoid code at global scope because it will be executed in pytest's discovery process. Classes, functions, and code in if __name__ == "__main__": blocks will not be run in this discovery process, but code at global scope (including imports) will.