test: when rc.local is busy, delay test until it's free

Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
Joachim Wiberg
2023-09-10 14:03:43 +02:00
parent 443700a88e
commit 3d74e93fa2
2 changed files with 5 additions and 1 deletions
+5
View File
@@ -269,6 +269,7 @@ teardown()
say "Final cleanup ..."
rm -f "$SYSROOT"/running_test.pid
rm -f "$SYSROOT$FINIT_CONF"
rm -f "$SYSROOT/etc/rc.local"
say "EXIT: $test_status"
exit $test_status
@@ -305,6 +306,10 @@ if [ -n "$BOOTSTRAP" ]; then
echo "$BOOTSTRAP" >> "$SYSROOT$FINIT_CONF"
fi
if [ -n "$RCLOCAL" ]; then
while [ -f "$SYSROOT/etc/rc.local" ]; do
echo "$SYSROOT/etc/rc.local busy ... waiting ..."
sleep 1
done
say "Setting up /etc/rc.local ..."
echo "$RCLOCAL" > "$SYSROOT/etc/rc.local"
chmod +x "$SYSROOT/etc/rc.local"
-1
View File
@@ -18,7 +18,6 @@ test_setup()
test_teardown()
{
say "Test done $(date)"
run "rm -f $SYSROOT/etc/rc.local"
}
sleep 1