aboutsummaryrefslogtreecommitdiffstats
path: root/test/framework.py
AgeCommit message (Expand)AuthorFilesLines
2018-04-17Add logging supportDamjan Marion1-0/+1
2018-03-24make test: fix DEBUG=gdb/gdbserver optionsKlement Sekera1-4/+3
2018-03-23make test: code cleanupKlement Sekera1-49/+25
2018-03-21reassembly: feature/concurrencyKlement Sekera1-0/+4
2018-03-14make test: early core detection, code cleanupKlement Sekera1-8/+5
2018-02-27make test: refactor vcl test casesDave Wallace1-2/+3
2018-02-22make test: tidy worker subprocess outputKlement Sekera1-1/+1
2018-02-19make test: Add VPP VCL cut-thru test.Dave Wallace1-0/+2
2018-02-17make test: add test framework debuggingKlement Sekera1-0/+9
2018-02-14make-test: use api custom-dump to reduce log size.Dave Wallace1-1/+1
2018-02-02make test: use random seedKlement Sekera1-1/+1
2018-02-01IPv4/6 reassemblyKlement Sekera1-7/+15
2018-01-09test: consolidate the multiple versions of send_and_*Neale Ranns1-0/+19
2017-11-10make test: fix logic for CACHE_OUTPUT optionKlement Sekera1-1/+1
2017-11-10make test: automatically seed random generatorKlement Sekera1-10/+34
2017-11-06make test: add CACHE_OUTPUT optionKlement Sekera1-0/+12
2017-11-01VPP Object Model (VOM)Neale Ranns1-0/+30
2017-10-10make test: add RETRIES optionKlement Sekera1-12/+39
2017-10-03make test: Copy api_post_mortem.$$ file tmp test dir for archiving.Dave Wallace1-5/+5
2017-09-30make test: Create link to failed test dir on timeout.Dave Wallace1-1/+1
2017-09-29make test: fix/disable VAPI tests on centosKlement Sekera1-0/+9
2017-08-17make test: collect symlinks to failed testsKlement Sekera1-1/+21
2017-08-12make test: fix broken DEBUG=gdb* optionsKlement Sekera1-2/+6
2017-08-10make test: detect hung testsKlement Sekera1-2/+40
2017-07-18make test: improve console output messagesKlement Sekera1-3/+3
2017-06-07make test: improve debugabilityKlement Sekera1-1/+2
2017-04-20make test: improve bfd reliabilityKlement Sekera1-1/+11
2017-04-12make test: don't rely on cPython GC to close fdsKlement Sekera1-8/+9
2017-04-10make test: automatic "vpp finishes startup" checkKlement Sekera1-13/+28
2017-04-06BFD-FIB interactionsNeale Ranns1-1/+1
2017-03-29Sub-net broadcast addresses for IPv4Neale Ranns1-1/+1
2017-03-24make test: fix broken plugin pathsKlement Sekera1-0/+2
2017-03-22make test: support out-of-tree pluginsKlement Sekera1-2/+10
2017-03-13ACL plugin rejects ICMP messages (VPP-624)Pavel Kotucek1-1/+8
2017-03-10Retire vpp_liteDamjan Marion1-1/+3
2017-03-08make test: split into basic and extended testsKlement Sekera1-3/+27
2017-03-06make test: reset object registry if vpp diesKlement Sekera1-0/+2
2017-03-06make test: tell vpp to set coredump sizeKlement Sekera1-6/+11
2017-02-26BFD: echo functionKlement Sekera1-1/+1
2017-02-19make test: save + dump VPP api trace log; VPP-640Dave Wallace1-0/+11
2017-02-15BFD: loop back echo packetsKlement Sekera1-0/+1
2017-02-14make test: improve stabilityKlement Sekera1-20/+58
2017-02-09make test: work around scapy truncated packetsKlement Sekera1-0/+32
2017-02-08BFD: modify session parametersKlement Sekera1-0/+4
2017-02-06make test: improve test filteringKlement Sekera1-2/+70
2017-02-02BFD: SHA1 authenticationKlement Sekera1-8/+7
2017-01-17make test: fix text output when non-interactiveKlement Sekera1-0/+8
2017-01-13make test: improve test results printingKlement Sekera1-2/+2
2017-01-11make test: improve documentation and PEP8 complianceKlement Sekera1-11/+12
2017-01-11BFD: fix bfd_udp_add APIKlement Sekera1-0/+3
>$(SANITY_RUN_VPP_CMD) ||\ (echo \"*******************************************************************\" &&\ echo \"* Sanity check failed, cannot run vpp\" &&\ echo \"*******************************************************************\" &&\ false)" .PHONY: ext ext: @if [ "$(EXTENDED_TESTS)" = "yes" ]; then\ make -C ext;\ fi test-dep: verify-test-dir $(PAPI_INSTALL_DONE) test: verify-test-dir $(PAPI_INSTALL_DONE) ext sanity reset $(call retest-func) retest: verify-test-dir sanity reset $(call retest-func) shell: verify-test-dir $(PAPI_INSTALL_DONE) @echo "source $(VENV_PATH)/bin/activate;\ echo '***';\ echo VPP_BUILD_DIR=$(VPP_BUILD_DIR);\ echo VPP_BIN=$(VPP_BIN);\ echo VPP_PLUGIN_PATH=$(VPP_PLUGIN_PATH);\ echo VPP_INSTALL_PATH=$(VPP_INSTALL_PATH);\ echo EXTERN_TESTS=$(EXTERN_TESTS);\ echo EXTERN_PLUGINS=$(EXTERN_PLUGINS);\ echo EXTERN_COV_DIR=$(EXTERN_COV_DIR);\ echo LD_LIBRARY_PATH=$(LD_LIBRARY_PATH);\ echo '***';\ exec </dev/tty" | bash -i .PHONY: wipe doc reset: @rm -f /dev/shm/vpp-unittest-* @rm -rf /tmp/vpp-unittest-* @rm -rf $(FAILED_DIR) @mkdir $(FAILED_DIR) wipe: reset @make -C ext clean @rm -rf $(VENV_PATH) @rm -f $(PAPI_INSTALL_FLAGS) doc: verify-test-dir $(PIP_PATCH_DONE) @virtualenv $(VENV_PATH) -p python3 @bash -c "source $(VENV_PATH)/bin/activate && python3 -m pip install sphinx sphinx-rtd-theme" @bash -c "source $(VENV_PATH)/bin/activate && make -C doc WS_ROOT=$(WS_ROOT) BR=$(BR) html" .PHONY: wipe-doc wipe-doc: @make -C doc wipe BR=$(BR) cov: wipe-cov reset ext verify-test-dir $(PAPI_INSTALL_DONE) @lcov --zerocounters --directory $(VPP_BUILD_DIR) @test -z "$(EXTERN_COV_DIR)" || lcov --zerocounters --directory $(EXTERN_COV_DIR) $(call retest-func) @mkdir $(BUILD_COV_DIR) @lcov --capture --directory $(VPP_BUILD_DIR) --output-file $(BUILD_COV_DIR)/coverage.info @test -z "$(EXTERN_COV_DIR)" || lcov --capture --directory $(EXTERN_COV_DIR) --output-file $(BUILD_COV_DIR)/extern-coverage.info @genhtml $(BUILD_COV_DIR)/coverage.info --output-directory $(BUILD_COV_DIR)/html @test -z "$(EXTERN_COV_DIR)" || genhtml $(BUILD_COV_DIR)/extern-coverage.info --output-directory $(BUILD_COV_DIR)/extern-html @echo @echo "Build finished. Code coverage report is in $(BUILD_COV_DIR)/html/index.html" @test -z "$(EXTERN_COV_DIR)" || echo "Code coverage report for out-of-tree objects is in $(BUILD_COV_DIR)/extern-html/index.html" .PHONY: wipe-cov wipe-cov: wipe @rm -rf $(BUILD_COV_DIR) .PHONY: checkstyle checkstyle: verify-test-dir @virtualenv $(VENV_PATH) -p python3 @bash -c "source $(VENV_PATH)/bin/activate && python3 -m pip install pycodestyle" @bash -c "source $(VENV_PATH)/bin/activate &&\ pycodestyle --show-source --ignore=W504,E126,E241,E226,E305,E704,E741,E722 --exclude=$(WS_ROOT)/test/_*.py -v $(WS_ROOT)/test/*.py ||\ (echo \"*******************************************************************\" &&\ echo \"* Test framework PEP8 compliance check FAILED \" &&\ echo \"*******************************************************************\" &&\ false)" @echo "*******************************************************************" @echo "* Test framework PEP8 compliance check passed" @echo "*******************************************************************" help: @echo "Running tests:" @echo "" @echo " test - build and run (basic) functional tests" @echo " test-debug - build and run (basic) functional tests (debug build)" @echo " test-all - build and run (all) functional tests" @echo " test-all-debug - build and run (all) functional tests (debug build)" @echo " retest - run functional tests" @echo " retest-debug - run functional tests (debug build)" @echo " test-wipe - wipe (temporary) files generated by unit tests" @echo " test-shell - enter shell with test environment" @echo " test-shell-debug - enter shell with test environment (debug build)" @echo "" @echo "Arguments controlling test runs:" @echo " V=[0|1|2] - set test verbosity level" @echo " 0=ERROR, 1=INFO, 2=DEBUG" @echo " TEST_JOBS=[<n>|auto] - use <n> parallel processes for test execution or automatic discovery of maximum acceptable processes (default: 1)" @echo " CACHE_OUTPUT=[0|1] - cache VPP stdout/stderr and log as one block after test finishes (default: 1)" @echo " FAILFAST=[0|1] - fail fast if 1, complete all tests if 0" @echo " TIMEOUT=<timeout> - fail test suite if any single test takes longer than <timeout> (in seconds) to finish (default: 600)" @echo " RETRIES=<n> - retry failed tests <n> times" @echo " DEBUG=<type> - set VPP debugging kind" @echo " DEBUG=core - detect coredump and load it in gdb on crash" @echo " DEBUG=gdb - allow easy debugging by printing VPP PID" @echo " and waiting for user input before running" @echo " and tearing down a testcase" @echo " DEBUG=gdbserver - run gdb inside a gdb server, otherwise" @echo " same as above" @echo " STEP=[yes|no] - ease debugging by stepping through a testcase" @echo " SANITY=[yes|no] - perform sanity import of vpp-api/sanity vpp run before running tests (default: yes)" @echo " EXTENDED_TESTS=[1|y] - run extended tests" @echo " TEST=<filter> - filter the set of tests:" @echo " by file-name - only run tests from specified file, e.g. TEST=test_bfd selects all tests from test_bfd.py" @echo " by file-suffix - same as file-name, but 'test_' is omitted e.g. TEST=bfd selects all tests from test_bfd.py" @echo " by wildcard - wildcard filter is <file>.<class>.<test function>, each can be replaced by '*'" @echo " e.g. TEST='test_bfd.*.*' is equivalent to above example of filter by file-name" @echo " TEST='bfd.*.*' is equivalent to above example of filter by file-suffix" @echo " TEST='bfd.BFDAPITestCase.*' selects all tests from test_bfd.py which are part of BFDAPITestCase class" @echo " TEST='bfd.BFDAPITestCase.test_add_bfd' selects a single test named test_add_bfd from test_bfd.py/BFDAPITestCase" @echo " TEST='*.*.test_add_bfd' selects all test functions named test_add_bfd from all files/classes" @echo "" @echo " VPP_ZOMBIE_NOCHECK=1 - skip checking for vpp (zombie) processes (CAUTION)" @echo " COREDUMP_SIZE=<size> - pass <size> as unix { coredump-size <size> } argument to vpp" @echo " e.g. COREDUMP_SIZE=4g" @echo " COREDUMP_SIZE=unlimited" @echo " EXTERN_TESTS=<path> - path to out-of-tree test_<name>.py files containing test cases" @echo " EXTERN_PLUGINS=<path>- path to out-of-tree plugins to be loaded by vpp under test" @echo " EXTERN_COV_DIR=<path>- path to out-of-tree prefix, where source, object and .gcda files can be found for coverage report" @echo "" @echo " PROFILE=1 - enable profiling of test framework via cProfile module" @echo " PROFILE_SORT_BY=opt - sort profiling report by opt - consult cProfile documentation for possible values (default: cumtime)" @echo " PROFILE_OUTPUT=file - output profiling info to file - use absolute path (default: stdout)" @echo "" @echo " TEST_DEBUG=1 - turn on debugging of the test framework itself (expert)" @echo "" @echo " SKIP_AARCH64=1 - skip tests that are failing on the ARM platorm in FD.io CI" @echo "" @echo "Creating test documentation" @echo " test-doc - generate documentation for test framework" @echo " test-wipe-doc - wipe documentation for test framework" @echo "" @echo "Creating test code coverage report" @echo " test-cov - generate code coverage report for test framework" @echo " test-wipe-cov - wipe code coverage report for test framework" @echo "" @echo "Verifying code-style" @echo " test-checkstyle - check PEP8 compliance" @echo ""