Move simulator cleanup into a separate script

pull/959/head
Morgan Pretty 1 year ago
parent c56e6b03c6
commit b5d94ab575

@ -108,22 +108,7 @@ local pre_boot_test_sim = {
local clean_up_test_simulator = {
name: 'Clean Up Test Simulator',
commands: [
|||
function handle_exit() {
xcrun simctl delete unavailable
if [ -e build/artifacts/sim_uuid ]; then
xcrun simctl delete $(<./build/artifacts/sim_uuid)
fi
exit 0
}
trap handle_exit EXIT
while true; do
sleep 10
done
|||
'./Scripts/clean-up-test-simulator.sh $(<./build/artifacts/sim_uuid)'
],
depends_on: [
'Pre-Boot Test Simulator',

@ -0,0 +1,22 @@
#!/usr/bin/env bash
#
# Script used with Drone CI to delete the simulator created for the unit tests when the pipline ends.
if [[ -z "$1" ]]; then
echo -e "\n\n\n\n\e[31;1mSimulator UUID not provided.\e[0m\n\n\n"
exit 1
fi
SIM_UUID="$1"
function handle_exit() {
xcrun simctl delete unavailable
xcrun simctl delete ${SIM_UUID}
exit 0
}
trap handle_exit EXIT
while true; do
sleep 10
done
Loading…
Cancel
Save