VulpesOS/gaia/tests/ci/unit-tests-coverage/before_script
OverSu b38dea0597 Publish Vulpes Preview 15 sources for desktop, Android and Tundra
Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
2026-09-30 23:13:03 +02:00

33 lines
678 B
Shell
Executable file

#! /bin/bash -v
# not using -e here because we use code failure for other things here.
RETRY=30
myself=`basename $0`
log() {
echo "LOG $myself: $@"
}
waiting_port() {
log "Waiting for embedded httpd server on port $1..."
for i in $(seq 1 $RETRY); do
nc -z localhost $1
if [ $? -eq 0 ]; then
log "Success!"
return
fi
log "Waited $i seconds."
sleep 1
done
log "Failed :("
exit 1
}
echo "Starting test-agent-server"
make test-agent-server &
echo 'Starting Firefox'
FIREFOX=`find firefox -name "firefox" | tail -n 1`
$FIREFOX -profile `pwd`/profile-debug "http://test-agent.gaiamobile.org:8080" > /dev/null 2>&1 &
waiting_port 8080