提交 97358f31 编写于 作者: N Nadeem Ghani 提交者: Chris Hajas

Clarify `make behave` behavior and remove unused call (#2490)

* Clarify `make behave` behavior and remove unused call

* Add flags argument to pass in custom flags to behave

Allows us to use more complex tag combinations for including/excluding
scenarios. This also removes the skip_tags argument as it only worked in
limited circumstances.
Signed-off-by: NNadeem Ghani <nghani@pivotal.io>
上级 f9ea4e79
......@@ -10,12 +10,14 @@ TAR?=$(shell which tar)
$(BEHAVE_BIN):
TAR=$(TAR) make -C bin $(BEHAVE_BIN)
# To pass in custom flags as behave args(such as multiple flags),
# use flags=--tags=foo, --tags=-bar
behave: $(BEHAVE_BIN)
@echo "Running behave on management scripts..."
if [ -n ""$(tags)"" ] && [ -n ""$(skip_tags)"" ]; then \
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH):$(GPMGMT_SRC) python $(BEHAVE_BIN) $(GPMGMT_SRC)/test/behave/* -s -k --tags=$(tags) --tags=$(skip_tags) 2>&1 ; \
elif [ -n ""$(tags)"" ]; then \
@if [ -n """$(flags)""" ]; then \
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH):$(GPMGMT_SRC) python $(BEHAVE_BIN) $(GPMGMT_SRC)/test/behave/* -s -k $(flags) 2>&1 ; \
elif [ -n """$(tags)""" ]; then \
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH):$(GPMGMT_SRC) python $(BEHAVE_BIN) $(GPMGMT_SRC)/test/behave/* -s -k --tags=$(tags) 2>&1 ; \
else \
PYTHONPATH=$(PYTHONSRC_INSTALL_PYTHON_PATH):$(GPMGMT_SRC) python $(BEHAVE_BIN) $(GPMGMT_SRC)/test/behave/* -s 2>&1; \
echo "Please specify tags=tagname or flags=[behave flags]"; \
fi
......@@ -4,4 +4,4 @@ source $HOME/qa.sh
cd $BLDWRAP_TOP/gpMgmt
make -f Makefile.behave behave $@ TAR=tar 2>&1
make -f Makefile.behave behave "$*" TAR=tar 2>&1
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册