Skip to content

autotest: remove the script we installed, not the one we installed from - #34095

Open
peterbarker wants to merge 1 commit into
ArduPilot:masterfrom
peterbarker:pr-claude2/pr/applet-script-install-name
Open

autotest: remove the script we installed, not the one we installed from#34095
peterbarker wants to merge 1 commit into
ArduPilot:masterfrom
peterbarker:pr-claude2/pr/applet-script-install-name

Conversation

@peterbarker

Copy link
Copy Markdown
Contributor

Summary

Correct tidy-up after script tests - so trick72.txt doesn't linger

Classification & Testing (check all that apply and add your own)

  • Checked by a human programmer
  • Non-functional change
  • No-binary change
  • Infrastructure change (e.g. unit tests, helper scripts)
  • Automated test(s) verify changes (e.g. unit test, autotest)
  • Tested manually, description below (e.g. SITL)
  • Tested on hardware
  • Logs attached
  • Logs available on request

Description

install_script() honours install_name when choosing the destination, but install_applet_script_context() recorded the source name for removal, so a script installed under a different name was never cleaned up when the context went away.

AerobaticsScripting installs Aerobatics/FixedWing/Schedules/AirShow.txt as trick72.txt: context pop then tried to unlink scripts/AirShow.txt, which had never existed, and left scripts/trick72.txt behind after every run. A stale file in scripts/ is loaded by the scripting engine on the next run.

install_script_module_context() already resolves install_name this way; do the same here.

install_script() honours install_name when choosing the destination, but
install_applet_script_context() recorded the source name for removal, so
a script installed under a different name was never cleaned up when the
context went away.

AerobaticsScripting installs Aerobatics/FixedWing/Schedules/AirShow.txt
as trick72.txt: context pop then tried to unlink scripts/AirShow.txt,
which had never existed, and left scripts/trick72.txt behind after every
run.  A stale file in scripts/ is loaded by the scripting engine on the
next run.

install_script_module_context() already resolves install_name this way;
do the same here.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

Status: No status

Development

Successfully merging this pull request may close these issues.

1 participant