Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(agw): Enabled flaky retry in CI #12077

Merged
2 changes: 1 addition & 1 deletion lte/gateway/fabfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -681,7 +681,7 @@ def _run_integ_tests(gateway_ip='192.168.60.142', tests=None):
' sudo ethtool --offload eth1 rx off tx off; sudo ethtool --offload eth2 rx off tx off;'
' source ~/build/python/bin/activate;'
' export GATEWAY_IP=%s;'
' make -i integ_test %s\''
' make -i integ_test ENABLE-FLAKY-RETRY=TRUE %s\''
% (key, host, port, gateway_ip, tests),
)

Expand Down
7 changes: 6 additions & 1 deletion lte/gateway/python/integ_tests/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -24,9 +24,14 @@ $(PYTHON_BUILD)/setupinteg_env:

# TODO T21489739 - Don't sleep and don't stop after a failure
RESULTS_DIR := /var/tmp/test_results
ifdef ENABLE-FLAKY-RETRY
VinashakAnkitAman marked this conversation as resolved.
Show resolved Hide resolved
FLAKY_CMD_ARGS := --with-flaky --force-flaky --no-success-flaky-report --max-runs=3 --min-passes=1
else
FLAKY_CMD_ARGS :=
endif
define execute_test
echo "Running test: $(1)"
timeout --foreground -k 930s 900s sudo -E PATH=$(PATH) PYTHONPATH=$(PYTHONPATH):$(S1AP_TESTER_PYTHON_PATH) $(PYTHON_BUILD)/bin/nosetests --with-flaky --force-flaky --no-success-flaky-report --max-runs=1 --min-passes=1 --with-xunit --xunit-file=$(RESULTS_DIR)/$(basename $(notdir $(1))).xml -x -s $(1) || (echo "fail" > $(MAGMA_ROOT)/test_status.txt && exit 1)
timeout --foreground -k 930s 900s sudo -E PATH=$(PATH) PYTHONPATH=$(PYTHONPATH):$(S1AP_TESTER_PYTHON_PATH) $(PYTHON_BUILD)/bin/nosetests $(FLAKY_CMD_ARGS) --with-xunit --xunit-file=$(RESULTS_DIR)/$(basename $(notdir $(1))).xml -x -s $(1) || (echo "fail" > $(MAGMA_ROOT)/test_status.txt && exit 1)
sleep 1
endef

Expand Down