Set BACKEND=osbuild-composer if running that test scenario
- this will execute cli sanity tests in parallel with the other - make sure to pass BACKED to vm.install too - more checks in lib.sh
This commit is contained in:
parent
27c4c67a59
commit
cc29b99659
2
Makefile
2
Makefile
@ -154,7 +154,7 @@ $(VM_IMAGE): srpm bots
|
|||||||
--upload $(CURDIR)/test/vm.install:/var/tmp/vm.install \
|
--upload $(CURDIR)/test/vm.install:/var/tmp/vm.install \
|
||||||
--upload $(realpath tests):/ \
|
--upload $(realpath tests):/ \
|
||||||
--run-command "chmod +x /var/tmp/vm.install" \
|
--run-command "chmod +x /var/tmp/vm.install" \
|
||||||
--run-command "cd /var/tmp; /var/tmp/vm.install $$srpm" \
|
--run-command "cd /var/tmp; BACKEND=$(BACKEND) /var/tmp/vm.install $$srpm" \
|
||||||
$(TEST_OS)
|
$(TEST_OS)
|
||||||
[ -f ~/.config/lorax-test-env ] && bots/image-customize \
|
[ -f ~/.config/lorax-test-env ] && bots/image-customize \
|
||||||
--upload ~/.config/lorax-test-env:/var/tmp/lorax-test-env \
|
--upload ~/.config/lorax-test-env:/var/tmp/lorax-test-env \
|
||||||
|
18
test/run
18
test/run
@ -4,12 +4,16 @@
|
|||||||
|
|
||||||
export BACKEND="${BACKEND:-lorax-composer}"
|
export BACKEND="${BACKEND:-lorax-composer}"
|
||||||
|
|
||||||
make vm
|
if [ "$BACKEND" == "osbuild-composer" ] || [ "$TEST_SCENARIO" == "osbuild-composer" ]; then
|
||||||
|
rm -rf ./test/images/*
|
||||||
if [ -n "$TEST_SCENARIO" ]; then
|
export BACKEND="osbuild-composer"
|
||||||
if [ "$TEST_SCENARIO" == "lorax" ]; then
|
make BACKEND=osbuild-composer vm
|
||||||
test/check-lorax TestLorax
|
|
||||||
fi
|
|
||||||
else
|
else
|
||||||
test/check-cli TestImages
|
make vm
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ "$TEST_SCENARIO" == "lorax" ]; then
|
||||||
|
test/check-lorax TestLorax
|
||||||
|
else
|
||||||
|
test/check-cli TestImages
|
||||||
fi
|
fi
|
||||||
|
@ -93,9 +93,9 @@ composer_start() {
|
|||||||
local rc
|
local rc
|
||||||
local params="$@"
|
local params="$@"
|
||||||
|
|
||||||
if [[ -z "$CLI" || "$CLI" == "./src/bin/composer-cli" ]]; then
|
if [ "$BACKEND" == "lorax-composer" ] && [[ -z "$CLI" || "$CLI" == "./src/bin/composer-cli" ]]; then
|
||||||
./src/sbin/lorax-composer $params --sharedir $SHARE_DIR $BLUEPRINTS_DIR &
|
./src/sbin/lorax-composer $params --sharedir $SHARE_DIR $BLUEPRINTS_DIR &
|
||||||
elif [ -n "$params" ]; then
|
elif [ "$BACKEND" == "lorax-composer" ] && [ -n "$params" ]; then
|
||||||
/usr/sbin/lorax-composer $params /var/lib/lorax/composer/blueprints &
|
/usr/sbin/lorax-composer $params /var/lib/lorax/composer/blueprints &
|
||||||
else
|
else
|
||||||
# socket stop/start seems to be necessary for a proper service restart
|
# socket stop/start seems to be necessary for a proper service restart
|
||||||
|
Loading…
Reference in New Issue
Block a user