Files
chromebrew/tests/unit_test_stub.sh
2024-11-06 19:07:48 +00:00

19 lines
657 B
Bash
Executable File

#!/bin/bash
# This is for use in Chromebrew Github CI Unit Tests.
# Version 1.0
set -e
echo "Chromebrew GitHub Action Unit Test Stub"
last_update=$(stat -c %y /usr/local/lib/crew/tests/unit_test_stub.sh)
echo "Last Updated: ${last_update}"
stub_mtime=$(stat -c %Y /usr/local/lib/crew/tests/unit_test_stub.sh)
echo "CHANGED_PACKAGES: ${CHANGED_PACKAGES}"
cd /usr/local/lib/crew/packages/
yes | crew update
yes | crew upgrade
new_stub_mtime=$(stat -c %Y /usr/local/lib/crew/tests/unit_test_stub.sh)
if [[ "$new_stub_mtime" != "$stub_mtime" ]]; then
echo "unit_test_stub.sh has been updated. Reloading..."
exec $0
fi
/usr/local/lib/crew/tests/unit_test.sh