diff options
author | Klement Sekera <ksekera@cisco.com> | 2016-10-11 11:47:09 +0200 |
---|---|---|
committer | Matej Klotton <mklotton@cisco.com> | 2016-10-26 17:42:19 +0200 |
commit | f62ae1288a776527c7f7ba3951531fbd07bc63da (patch) | |
tree | ca877f7e3bb7e4f6309cf711fca9de1fcd4865a2 /test/Makefile | |
parent | f530a5526a1f501462ff4247a5bb38e80c13678d (diff) |
refactor test framework
Change-Id: I31da3b1857b6399f9899276a2d99cdd19436296c
Signed-off-by: Klement Sekera <ksekera@cisco.com>
Signed-off-by: Matej Klotton <mklotton@cisco.com>
Signed-off-by: Jan Gelety <jgelety@cisco.com>
Signed-off-by: Juraj Sloboda <jsloboda@cisco.com>
Diffstat (limited to 'test/Makefile')
-rw-r--r-- | test/Makefile | 23 |
1 files changed, 21 insertions, 2 deletions
diff --git a/test/Makefile b/test/Makefile index 7cbcf97a21d..c90679e8e20 100644 --- a/test/Makefile +++ b/test/Makefile @@ -1,3 +1,22 @@ +PYTHON_VENV_PATH=$(PYTHON_PATH)/virtualenv -all: - @python run_tests.py discover -p test_$(TEST)"*.py" +test: clean + @virtualenv $(PYTHON_VENV_PATH) + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install scapy" + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install pexpect" + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && cd $(WS_ROOT)/vpp-api/python && python setup.py install" + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python run_tests.py discover -p test_$(TEST)\"*.py\"" + +retest: clean + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python run_tests.py discover -p test_$(TEST)\"*.py\"" + +.PHONY: clean doc + +clean: + @rm -f /dev/shm/vpp-unittest-* + @rm -rf /tmp/vpp-unittest-* + +doc: + @virtualenv $(PYTHON_VENV_PATH) + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install sphinx" + @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && make -C doc html" |