2018-10-02 20:30:02 +00:00
|
|
|
#!/bin/bash
|
|
|
|
# Note: execute this file from the project root directory
|
|
|
|
|
|
|
|
# setup
|
2018-09-21 09:46:54 +00:00
|
|
|
rm -rf /var/tmp/beakerlib-*/
|
2018-10-02 20:30:02 +00:00
|
|
|
export top_srcdir=`pwd`
|
|
|
|
. ./tests/testenv.sh
|
|
|
|
|
|
|
|
# start the lorax-composer daemon
|
2018-09-21 09:46:54 +00:00
|
|
|
./src/sbin/lorax-composer --sharedir ./share/ ./tests/pylorax/blueprints/ &
|
2018-10-02 20:30:02 +00:00
|
|
|
|
|
|
|
# wait for the backend to become ready
|
|
|
|
until curl --unix-socket /run/weldr/api.socket http://localhost:4000/api/status | grep '"db_supported": true'; do
|
|
|
|
sleep 2
|
|
|
|
echo "DEBUG: Waiting for backend API to become ready before testing ..."
|
|
|
|
done;
|
|
|
|
|
|
|
|
# invoke cli/ tests
|
|
|
|
./tests/cli/test_blueprints_sanity.sh
|
2018-09-21 09:46:54 +00:00
|
|
|
./tests/cli/test_compose_sanity.sh
|
2018-10-02 20:30:02 +00:00
|
|
|
|
|
|
|
# look for failures
|
2018-09-21 09:46:54 +00:00
|
|
|
grep RESULT_STRING /var/tmp/beakerlib-*/TestResults | grep -v PASS && exit 1
|
2018-10-02 20:30:02 +00:00
|
|
|
|
|
|
|
# explicit return code for Makefile
|
|
|
|
exit 0
|