mirror of https://github.com/sipwise/ngcp-csc.git
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.4 KiB
49 lines
1.4 KiB
#!/bin/bash
|
|
|
|
if ! [ -f /.dockerenv ] && ! grep -q 'devices:/docker' /proc/1/cgroup ; then
|
|
echo "Not running inside docker, exiting to avoid data damage." >&2
|
|
exit 1
|
|
fi
|
|
|
|
set -e
|
|
set -u
|
|
|
|
pwd
|
|
|
|
pkill -f '/usr/bin/java -jar /home/selenium/selenium-server-standalone.jar' || true
|
|
# NOTE: this could silently fail because selenium-server-standalone.jar is missing a daemonize option
|
|
DISPLAY=:98 /usr/bin/java -jar /home/selenium/selenium-server-standalone.jar -trustAllSSLCertificates -log /home/selenium/selenium.log &
|
|
|
|
sleep 5
|
|
|
|
echo "### Copying and moving files"
|
|
cp -Rf . /tmp/code
|
|
ln -s /tmp/node_modules /tmp/code/node_modules
|
|
cd /tmp/code/
|
|
|
|
echo "################################################################################"
|
|
echo "Finished main setup, now running tests ..."
|
|
echo "Selenium server log file available at /home/selenium/selenium.log"
|
|
|
|
echo "### Building app"
|
|
/opt/Sencha/Cmd/sencha app build -c
|
|
|
|
cd /tmp/code/t/
|
|
echo "### Starting Karma test"
|
|
./node_modules/karma/bin/karma start config/karma.conf.js
|
|
|
|
cd /tmp/code/
|
|
echo "### Starting app server"
|
|
/opt/Sencha/Cmd/sencha web start &
|
|
sleep 5
|
|
|
|
cd /tmp/code/t/
|
|
echo "### Starting Webdriver.io test"
|
|
./node_modules/.bin/wdio config/wdio.conf.js
|
|
|
|
echo "### Moving JUnit XML files to /results"
|
|
mv /tmp/code/t/*.xml /results
|
|
|
|
echo "Finished test execution, test execution returned with exit code."
|
|
echo "################################################################################"
|