VulpesOS/gaia/tests/ci/unit-tests-in-b2g/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

45 lines
891 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
}
make node_modules
echo "Starting test-agent-server"
make test-agent-server &
echo 'Starting Mulet'
MULET_PATH="./firefox/firefox-bin"
if [ ! -x "$MULET_PATH" ] ; then
# set the path for Mac OS X
MULET_PATH="./firefox/Contents/MacOS/firefox-bin"
fi
# if we still don't have it, fail
if [ ! -x "$MULET_PATH" ] ; then
echo "mulet path doesn't exists"
exit 1
fi
$MULET_PATH -profile `pwd`/profile-debug app://test-agent.gaiamobile.org/ &
waiting_port 8080