Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Tools: remove absolute path reference to rm command
On some systems (e.g. NixOS) it's not there.
  • Loading branch information
tpwrules committed Nov 3, 2025
commit f0315f89f7811229ac3787d2b6ba1137bbe3b105
2 changes: 1 addition & 1 deletion Tools/autotest/autotest.py
Original file line number Diff line number Diff line change
Expand Up @@ -404,7 +404,7 @@ def run_specific_test(step, *args, **kwargs):
def run_step(step):
"""Run one step."""
# remove old logs
util.run_cmd('/bin/rm -f logs/*.BIN logs/LASTLOG.TXT')
util.run_cmd('rm -f logs/*.BIN logs/LASTLOG.TXT')
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shouldn't we use the python rm instead ? that would improve compatibility and safety ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, probably. I will definitely review any PR which bring that in - but in the meantime this unbreaks this for Thomas, so I do intend to merge.


if step == "prerequisites":
return test_prerequisites()
Expand Down
4 changes: 2 additions & 2 deletions Tools/autotest/vehicle_test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -8989,11 +8989,11 @@ def bin_logs(self):
return glob.glob("logs/*.BIN")

def remove_bin_logs(self):
util.run_cmd('/bin/rm -f logs/*.BIN logs/LASTLOG.TXT')
util.run_cmd('rm -f logs/*.BIN logs/LASTLOG.TXT')

def remove_ardupilot_terrain_cache(self):
'''removes the terrain files ArduPilot keeps in its onboiard storage'''
util.run_cmd('/bin/rm -f %s' % util.reltopdir("terrain/*.DAT"))
util.run_cmd('rm -f %s' % util.reltopdir("terrain/*.DAT"))

def check_logs(self, name):
'''called to move relevant log files from our working directory to the
Expand Down
2 changes: 1 addition & 1 deletion Tools/scripts/build_autotest.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ lock_file() {
}
return 1
fi
/bin/rm -f "$lck"
rm -f "$lck"
echo "$$" > "$lck"
return 0
}
Expand Down
2 changes: 1 addition & 1 deletion Tools/scripts/dumpcore.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,4 @@ generate-core-file $COREFILE
quit
EOF
gdb -n -batch -x $TMPFILE --pid $PID < /dev/null 2>&1
/bin/rm -f $TMPFILE
rm -f $TMPFILE
2 changes: 1 addition & 1 deletion Tools/scripts/dumpstack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ thread apply all bt full
quit
EOF
gdb -n -batch -x $TMPFILE --pid $PID < /dev/null 2>&1
/bin/rm -f $TMPFILE
rm -f $TMPFILE
Loading