Skip to content

Commit e95d3ad

Browse files
committed
Wait for the mobile app to finish compiling before running tests
1 parent 5ba5753 commit e95d3ad

File tree

2 files changed

+15
-0
lines changed

2 files changed

+15
-0
lines changed

bin/moodle-docker-wait-for-app

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#!/usr/bin/env bash
2+
set -e
3+
4+
basedir="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../" && pwd )"
5+
6+
if [[ ! -z "$MOODLE_DOCKER_BROWSER" ]] && [[ "$MOODLE_DOCKER_BROWSER" == "chrome" ]] && [[ ! -z "$MOODLE_MOBILE_VERSION" ]];
7+
then
8+
until $basedir/bin/moodle-docker-compose logs mobileapp | grep -q 'dev server running: ';
9+
do
10+
echo 'Waiting for Moodle app to come up...'
11+
sleep 15
12+
done
13+
fi

tests/setup.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,7 @@ echo "Starting up container"
2626
$basedir/bin/moodle-docker-compose up -d
2727
echo "Waiting for DB to come up"
2828
$basedir/bin/moodle-docker-wait-for-db
29+
echo "Waiting for Moodle app to come up"
30+
$basedir/bin/moodle-docker-wait-for-app
2931
echo "Running: $initcmd"
3032
$basedir/$initcmd

0 commit comments

Comments
 (0)