Share Gaia assets and adapters, keep private profiles and development documents local, and update both public READMEs.
33 lines
655 B
Shell
Executable file
33 lines
655 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 "app://test-agent.gaiamobile.org" &
|
|
waiting_port 8080
|