Exclude exporter, fail correctly on sub-shell failure.
@@ -20,7 +20,7 @@ BINARIES := bin
# All components are prefixed by st2 and not .egg-info.
COMPONENTS := $(shell ls -a | grep ^st2 | grep -v .egg-info)
COMPONENTS_RUNNERS := $(wildcard contrib/runners/*)
-COMPONENTS_WITHOUT_ST2TESTS := $(shell ls -a | grep ^st2 | grep -v .egg-info | grep -v st2tests)
+COMPONENTS_WITHOUT_ST2TESTS := $(shell ls -a | grep ^st2 | grep -v .egg-info | grep -v st2tests | grep -v st2exporter)
COMPONENTS_WITH_RUNNERS := $(COMPONENTS) $(COMPONENTS_RUNNERS)
@@ -170,9 +170,9 @@ check-python-packages:
echo "==========================================================="; \
echo "Checking component:" $$component; \
echo "==========================================================="; \
- (cd $$component; ../$(VIRTUALENV_DIR)/bin/python setup.py --version) || break; \
- (cd $$component; ../$(VIRTUALENV_DIR)/bin/python setup.py sdist bdist_wheel) || break; \
- (cd $$component; rm -rf dist/; rm -rf $$component.egg-info) || break; \
+ (set -e; cd $$component; ../$(VIRTUALENV_DIR)/bin/python setup.py --version) || exit 1; \
+ (set -e; cd $$component; ../$(VIRTUALENV_DIR)/bin/python setup.py sdist bdist_wheel) || exit 1; \
+ (set -e; cd $$component; rm -rf dist/; rm -rf $$component.egg-info) || exit 1; \
done
.PHONY: checklogs
@@ -401,7 +401,7 @@ distclean: clean
rm -rf $(VIRTUALENV_DIR)
.PHONY: requirements
-requirements: virtualenv .sdist-requirements install-runners
+requirements: virtualenv .sdist-requirements
@echo
@echo "==================== requirements ===================="
@echo
@@ -774,6 +774,8 @@ packs-tests: requirements .packs-tests
@echo
@echo "==================== packs-tests ===================="
@echo
+ # Install st2common to register metrics drivers
+ (cd ${ROOT_DIR}/st2common; ${ROOT_DIR}/$(VIRTUALENV_DIR)/bin/python setup.py develop --no-deps)
. $(VIRTUALENV_DIR)/bin/activate; find ${ROOT_DIR}/contrib/* -maxdepth 0 -type d -print0 | xargs -0 -I FILENAME ./st2common/bin/st2-run-pack-tests -c -t -x -p FILENAME
