aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--.gitignore6
-rw-r--r--Makefile15
-rw-r--r--test/Makefile92
-rwxr-xr-xtest/discover_tests.py9
-rw-r--r--test/doc/Makefile6
-rw-r--r--test/ext/Makefile12
-rw-r--r--test/framework.py6
-rw-r--r--test/run_tests.py9
-rw-r--r--test/test_jvpp.py2
-rw-r--r--test/test_vapi.py8
-rw-r--r--test/test_vcl.py2
-rw-r--r--test/test_vom.py4
-rw-r--r--test/vpp_papi_provider.py2
13 files changed, 89 insertions, 84 deletions
diff --git a/.gitignore b/.gitignore
index 63f02fa0693..7d46d3d0ad3 100644
--- a/.gitignore
+++ b/.gitignore
@@ -17,9 +17,9 @@
/build-root/rpmbuild/
/build-root/test-doc/
/build-root/test-cov/
-/build-root/python/
-/build-root/vapi_test/
-/build-root/vom_test/
+/test/run/
+/test/build/
+/test/coverage/
/build-config.mk
/build/external/*.tar.gz
/build/external/*.tar.xz
diff --git a/Makefile b/Makefile
index e0c710fdfd7..d5cc9f3785a 100644
--- a/Makefile
+++ b/Makefile
@@ -370,19 +370,18 @@ wipe-release: test-wipe $(BR)/.deps.ok
rebuild-release: wipe-release build-release
-export VPP_PYTHON_PREFIX ?= $(BR)/python
-
libexpand = $(subst $(subst ,, ),:,$(foreach lib,$(1),$(BR)/install-$(2)-native/vpp/$(lib)/$(3)))
+export TEST_DIR ?= $(WS_ROOT)/test
+
define test
$(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=$(1) TAG=$(2) vpp-install,)
$(eval libs:=lib lib64)
make -C test \
- TEST_DIR=$(WS_ROOT)/test \
- VPP_TEST_BUILD_DIR=$(BR)/build-$(2)-native \
- VPP_TEST_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \
- VPP_TEST_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_plugins) \
- VPP_TEST_INSTALL_PATH=$(BR)/install-$(2)-native/ \
+ VPP_BUILD_DIR=$(BR)/build-$(2)-native \
+ VPP_BIN=$(BR)/install-$(2)-native/vpp/bin/vpp \
+ VPP_PLUGIN_PATH=$(call libexpand,$(libs),$(2),vpp_plugins) \
+ VPP_INSTALL_PATH=$(BR)/install-$(2)-native/ \
LD_LIBRARY_PATH=$(call libexpand,$(libs),$(2),) \
EXTENDED_TESTS=$(EXTENDED_TESTS) \
PYTHON=$(PYTHON) \
@@ -398,7 +397,7 @@ test-debug:
$(call test,vpp,vpp_debug,test)
test-all:
- $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp_debug vom-install japi-install,)
+ $(if $(filter-out $(3),retest),make -C $(BR) PLATFORM=vpp TAG=vpp vom-install japi-install,)
$(eval EXTENDED_TESTS=yes)
$(call test,vpp,vpp,test)
diff --git a/test/Makefile b/test/Makefile
index 0369018af2f..eae2d894b1f 100644
--- a/test/Makefile
+++ b/test/Makefile
@@ -1,10 +1,10 @@
-.PHONY: verify-python-path
+.PHONY: verify-test-dir
-VPP_TEST_FAILED_DIR=/tmp/vpp-failed-unittests/
+FAILED_DIR=/tmp/vpp-failed-unittests/
-verify-python-path:
-ifndef VPP_PYTHON_PREFIX
- $(error VPP_PYTHON_PREFIX is not set)
+verify-test-dir:
+ifndef TEST_DIR
+ $(error TEST_DIR is not set)
endif
.PHONY: verify-no-running-vpp
@@ -65,22 +65,24 @@ ifneq ($(EXTERN_TESTS),)
UNITTEST_EXTRA_OPTS=$(UNITTEST_FAILFAST_OPTS) -d $(EXTERN_TESTS)
endif
+VENV_PATH=$(TEST_DIR)/run/venv
+
ifeq ($(TEST_DEBUG),1)
-VPP_PYTHON_PREFIX:=$(VPP_PYTHON_PREFIX)/debug
+TEST_RUN_DIR:=$(VENV_PATH)/run-debug
PYTHON_EXTRA_DEPENDS=objgraph pympler
else
+TEST_RUN_DIR:=$(VENV_PATH)/run
PYTHON_EXTRA_DEPENDS=
endif
-PYTHON_VENV_PATH=$(VPP_PYTHON_PREFIX)/virtualenv
PYTHON_DEPENDS=$(PYTHON_EXTRA_DEPENDS) -r requirements.txt
-SCAPY_SOURCE=$(shell find $(PYTHON_VENV_PATH) -name site-packages)
-BUILD_COV_DIR=$(BR)/test-cov
+SCAPY_SOURCE=$(shell find $(VENV_PATH) -name site-packages)
+BUILD_COV_DIR=$(TEST_DIR)/coverage
-GET_PIP_SCRIPT=$(VPP_PYTHON_PREFIX)/get-pip.py
-PIP_INSTALL_DONE=$(VPP_PYTHON_PREFIX)/pip-install.done
-PIP_PATCH_DONE=$(VPP_PYTHON_PREFIX)/pip-patch.done
-PAPI_INSTALL_DONE=$(VPP_PYTHON_PREFIX)/papi-install.done
+GET_PIP_SCRIPT=$(TEST_RUN_DIR)/get-pip.py
+PIP_INSTALL_DONE=$(TEST_RUN_DIR)/pip-install.done
+PIP_PATCH_DONE=$(TEST_RUN_DIR)/pip-patch.done
+PAPI_INSTALL_DONE=$(TEST_RUN_DIR)/papi-install.done
PAPI_INSTALL_FLAGS=$(PIP_INSTALL_DONE) $(PIP_PATCH_DONE) $(PAPI_INSTALL_DONE)
@@ -91,13 +93,13 @@ PYTHON_INTERP=$(PYTHON)
endif
$(GET_PIP_SCRIPT):
- @mkdir -p $(VPP_PYTHON_PREFIX)
- @bash -c "cd $(VPP_PYTHON_PREFIX) && curl -O https://bootstrap.pypa.io/get-pip.py"
+ @mkdir -p $(TEST_RUN_DIR)
+ @bash -c "cd $(TEST_RUN_DIR) && curl -O https://bootstrap.pypa.io/get-pip.py"
$(PIP_INSTALL_DONE): $(GET_PIP_SCRIPT)
- @virtualenv $(PYTHON_VENV_PATH) -p $(PYTHON_INTERP)
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && python $(GET_PIP_SCRIPT)"
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS)"
+ @virtualenv $(VENV_PATH) -p $(PYTHON_INTERP)
+ @bash -c "source $(VENV_PATH)/bin/activate && python $(GET_PIP_SCRIPT)"
+ @bash -c "source $(VENV_PATH)/bin/activate && pip install $(PYTHON_DEPENDS)"
@touch $@
$(PIP_PATCH_DONE): $(PIP_INSTALL_DONE)
@@ -110,11 +112,11 @@ $(PIP_PATCH_DONE): $(PIP_INSTALL_DONE)
@touch $@
$(PAPI_INSTALL_DONE): $(PIP_PATCH_DONE)
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && cd $(WS_ROOT)/src/vpp-api/python && python setup.py install"
+ @bash -c "source $(VENV_PATH)/bin/activate && cd $(WS_ROOT)/src/vpp-api/python && python setup.py install"
@touch $@
define retest-func
-@env FORCE_FOREGROUND=$(FORCE_FOREGROUND) VPP_TEST_FAILED_DIR=$(VPP_TEST_FAILED_DIR) scripts/setsid_wrapper.sh $(FORCE_FOREGROUND) $(PYTHON_VENV_PATH)/bin/activate python $(PYTHON_PROFILE_OPTS) run_tests.py -d $(TEST_DIR) $(UNITTEST_EXTRA_OPTS) || env VPP_TEST_FAILED_DIR=$(VPP_TEST_FAILED_DIR) COMPRESS_FAILED_TEST_LOGS=$(COMPRESS_FAILED_TEST_LOGS) scripts/compress_failed.sh
+@env FORCE_FOREGROUND=$(FORCE_FOREGROUND) FAILED_DIR=$(FAILED_DIR) VENV_PATH=$(VENV_PATH) scripts/setsid_wrapper.sh $(FORCE_FOREGROUND) $(VENV_PATH)/bin/activate python $(PYTHON_PROFILE_OPTS) run_tests.py -d $(TEST_DIR) $(UNITTEST_EXTRA_OPTS) || env FAILED_DIR=$(FAILED_DIR) COMPRESS_FAILED_TEST_LOGS=$(COMPRESS_FAILED_TEST_LOGS) scripts/compress_failed.sh
endef
.PHONY: sanity
@@ -123,8 +125,8 @@ ifeq ($(SANITY),no)
SANITY_IMPORT_VPP_PAPI_CMD=true
SANITY_RUN_VPP_CMD=true
else
-SANITY_IMPORT_VPP_PAPI_CMD=source $(PYTHON_VENV_PATH)/bin/activate && python sanity_import_vpp_papi.py
-SANITY_RUN_VPP_CMD=source $(PYTHON_VENV_PATH)/bin/activate && python sanity_run_vpp.py
+SANITY_IMPORT_VPP_PAPI_CMD=source $(VENV_PATH)/bin/activate && python sanity_import_vpp_papi.py
+SANITY_RUN_VPP_CMD=source $(VENV_PATH)/bin/activate && python sanity_run_vpp.py
endif
ifndef TEST_JOBS
@@ -166,21 +168,21 @@ ext:
make -C ext;\
fi
-test-dep: verify-python-path $(PAPI_INSTALL_DONE)
+test-dep: verify-test-dir $(PAPI_INSTALL_DONE)
-test: verify-python-path $(PAPI_INSTALL_DONE) ext sanity reset
+test: verify-test-dir $(PAPI_INSTALL_DONE) ext sanity reset
$(call retest-func)
-retest: verify-python-path sanity reset
+retest: verify-test-dir sanity reset
$(call retest-func)
-shell: verify-python-path $(PAPI_INSTALL_DONE)
- @echo "source $(PYTHON_VENV_PATH)/bin/activate;\
+shell: verify-test-dir $(PAPI_INSTALL_DONE)
+ @echo "source $(VENV_PATH)/bin/activate;\
echo '***';\
- echo VPP_TEST_BUILD_DIR=$(VPP_TEST_BUILD_DIR);\
- echo VPP_TEST_BIN=$(VPP_TEST_BIN);\
- echo VPP_TEST_PLUGIN_PATH=$(VPP_TEST_PLUGIN_PATH);\
- echo VPP_TEST_INSTALL_PATH=$(VPP_TEST_INSTALL_PATH);\
+ echo _BUILD_DIR=$(VPP_BUILD_DIR);\
+ echo _BIN=$(VPP_BIN);\
+ echo _PLUGIN_PATH=$(VPP_PLUGIN_PATH);\
+ echo _INSTALL_PATH=$(VPP_INSTALL_PATH);\
echo EXTERN_TESTS=$(EXTERN_TESTS);\
echo EXTERN_PLUGINS=$(EXTERN_PLUGINS);\
echo EXTERN_COV_DIR=$(EXTERN_COV_DIR);\
@@ -193,30 +195,30 @@ shell: verify-python-path $(PAPI_INSTALL_DONE)
reset:
@rm -f /dev/shm/vpp-unittest-*
@rm -rf /tmp/vpp-unittest-*
- @rm -rf $(VPP_TEST_FAILED_DIR)
- @mkdir $(VPP_TEST_FAILED_DIR)
+ @rm -rf $(FAILED_DIR)
+ @mkdir $(FAILED_DIR)
wipe: reset
@make -C ext clean
- @rm -rf $(PYTHON_VENV_PATH)
+ @rm -rf $(VENV_PATH)
@rm -f $(PAPI_INSTALL_FLAGS)
-doc: verify-python-path $(PIP_PATCH_DONE)
- @virtualenv $(PYTHON_VENV_PATH) -p $(PYTHON_INTERP)
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install sphinx sphinx-rtd-theme"
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && make -C doc WS_ROOT=$(WS_ROOT) BR=$(BR) NO_VPP_PAPI=1 html"
+doc: verify-test-dir $(PIP_PATCH_DONE)
+ @virtualenv $(VENV_PATH) -p $(PYTHON_INTERP)
+ @bash -c "source $(VENV_PATH)/bin/activate && pip install sphinx sphinx-rtd-theme"
+ @bash -c "source $(VENV_PATH)/bin/activate && make -C doc WS_ROOT=$(WS_ROOT) BR=$(BR) NO_VPP_PAPI=1 html"
.PHONY: wipe-doc
wipe-doc:
@make -C doc wipe BR=$(BR)
-cov: wipe-cov reset ext verify-python-path $(PAPI_INSTALL_DONE)
- @lcov --zerocounters --directory $(VPP_TEST_BUILD_DIR)
+cov: wipe-cov reset ext verify-test-dir $(PAPI_INSTALL_DONE)
+ @lcov --zerocounters --directory $(_BUILD_DIR)
@test -z "$(EXTERN_COV_DIR)" || lcov --zerocounters --directory $(EXTERN_COV_DIR)
$(call retest-func)
@mkdir $(BUILD_COV_DIR)
- @lcov --capture --directory $(VPP_TEST_BUILD_DIR) --output-file $(BUILD_COV_DIR)/coverage.info
+ @lcov --capture --directory $(_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
@@ -230,10 +232,10 @@ wipe-cov: wipe
@rm -rf $(BUILD_COV_DIR)
.PHONY: checkstyle
-checkstyle: verify-python-path
- @virtualenv $(PYTHON_VENV_PATH) -p $(PYTHON_INTERP)
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate && pip install pycodestyle"
- @bash -c "source $(PYTHON_VENV_PATH)/bin/activate &&\
+checkstyle: verify-test-dir
+ @virtualenv $(VENV_PATH) -p $(PYTHON_INTERP)
+ @bash -c "source $(VENV_PATH)/bin/activate && pip install pycodestyle"
+ @bash -c "source $(VENV_PATH)/bin/activate &&\
pycodestyle --show-source --ignore=W504,E126,E241,E226,E305,E704,E741,E722 -v $(WS_ROOT)/test/*.py ||\
(echo \"*******************************************************************\" &&\
echo \"* Test framework PEP8 compliance check FAILED \" &&\
diff --git a/test/discover_tests.py b/test/discover_tests.py
index fbd2d9c7e59..6dea20e3de5 100755
--- a/test/discover_tests.py
+++ b/test/discover_tests.py
@@ -7,12 +7,14 @@ import importlib
import argparse
-def discover_tests(directory, callback):
+def discover_tests(directory, callback, ignore_path):
do_insert = True
for _f in os.listdir(directory):
f = "%s/%s" % (directory, _f)
if os.path.isdir(f):
- discover_tests(f, callback)
+ if ignore_path is not None and f.startswith(ignore_path):
+ continue
+ discover_tests(f, callback, ignore_path)
continue
if not os.path.isfile(f):
continue
@@ -50,6 +52,7 @@ if __name__ == '__main__':
if args.dir is None:
args.dir = "."
+ ignore_path = os.getenv("VENV_PATH", "")
suite = unittest.TestSuite()
for d in args.dir:
- discover_tests(d, print_callback)
+ discover_tests(d, print_callback, ignore_path)
diff --git a/test/doc/Makefile b/test/doc/Makefile
index ff96b5fd80e..be070e15346 100644
--- a/test/doc/Makefile
+++ b/test/doc/Makefile
@@ -3,10 +3,10 @@
# You can set these variables from the command line.
SPHINXOPTS =
-SRC_DOC_DIR = $(WS_ROOT)/test/doc
+SRC_DOC_DIR = $(TEST_DIR)/doc
SPHINXBUILD = sphinx-build
PAPER =
-BUILD_DOC_ROOT = $(BR)/test-doc
+BUILD_DOC_ROOT = $(TEST_DIR)/doc
BUILD_DOC_DIR = $(BUILD_DOC_ROOT)/build
API_DOC_GEN_DIR = $(BUILD_DOC_ROOT)/apidoc
@@ -16,7 +16,7 @@ PAPEROPT_letter = -D latex_paper_size=letter
ALLSPHINXOPTS = -d $(BUILD_DOC_DIR)/.sphinx-cache $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) $(API_DOC_GEN_DIR) -c $(SRC_DOC_DIR)
# the i18n builder cannot share the environment and doctrees with the others
I18NSPHINXOPTS = $(PAPEROPT_$(PAPER)) $(SPHINXOPTS) .
-IN_VENV:=$(shell if pip -V | grep "virtualenv" 2>&1 > /dev/null; then echo 1; else echo 0; fi)
+IN_VENV:=$(shell if pip -V | grep "venv" 2>&1 > /dev/null; then echo 1; else echo 0; fi)
.PHONY: verify-virtualenv
verify-virtualenv:
diff --git a/test/ext/Makefile b/test/ext/Makefile
index 4ae56cfc3eb..de219b1a5dc 100644
--- a/test/ext/Makefile
+++ b/test/ext/Makefile
@@ -1,7 +1,7 @@
-VAPI_BINDIR = $(BR)/vapi_test/
+VAPI_BINDIR = $(TEST_DIR)/build/vapi_test/
VAPI_CBIN = $(addprefix $(VAPI_BINDIR), vapi_c_test)
VAPI_CPPBIN = $(addprefix $(VAPI_BINDIR), vapi_cpp_test)
-VOM_BINDIR = $(BR)/vom_test/
+VOM_BINDIR = $(TEST_DIR)/build/vom_test/
VOM_BIN = $(addprefix $(VOM_BINDIR), vom_test)
ifeq ($(filter rhel centos,$(OS_ID)),$(OS_ID))
@@ -9,14 +9,14 @@ VAPI_CPPBIN=
endif
VAPI_LIBS = \
- -L$(VPP_TEST_INSTALL_PATH)/vpp/lib \
+ -L$(VPP_INSTALL_PATH)/vpp/lib \
-lvppinfra -lvlibmemoryclient -lsvm -lpthread -lcheck -lrt -lm -lvapiclient
ifneq ($(filter centos opensuse opensuse-tumbleweed opensuse-leap,$(OS_ID)),$(OS_ID))
VAPI_LIBS += -lsubunit
endif
-FLAGS = -g -Wall -lstdc++ -pthread -I$(WS_ROOT)/src -I$(VPP_TEST_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR)
+FLAGS = -g -Wall -lstdc++ -pthread -I$(WS_ROOT)/src -I$(VPP_INSTALL_PATH)/vpp/include -I$(VAPI_BINDIR)
CFLAGS = -std=gnu99 $(FLAGS)
CPPFLAGS = -std=c++11 $(FLAGS) -I$(WS_ROOT)/extras/vom
@@ -55,7 +55,7 @@ $(VOM_BINDIR):
LIB_VOM = -lvom
VOM_LIBS = \
- -L$(VPP_TEST_INSTALL_PATH)/vom/lib \
+ -L$(VPP_INSTALL_PATH)/vom/lib \
-lvom \
-lboost_thread \
-lboost_system \
@@ -69,7 +69,7 @@ VOM_CPPFLAGS = \
$(CPPFLAGS)
$(VOM_BIN): $(VOM_CPPSRC) $(VOM_BINDIR)
- $(CXX) -o $@ $(VOM_CPPFLAGS) -O0 -g $(VOM_CPPSRC) $(VOM_LIBS) -Wl,-rpath,$(VPP_TEST_INSTALL_PATH)/vom/lib
+ $(CXX) -o $@ $(VOM_CPPFLAGS) -O0 -g $(VOM_CPPSRC) $(VOM_LIBS) -Wl,-rpath,$(VPP_INSTALL_PATH)/vom/lib
$(VOM_BIN).d: $(VOM_CPPSRC) $(VOM_BINDIR)
$(CXX) -o $@ $(VOM_CPPFLAGS) -MM -MT '$(VOM_BIN)' $(VOM_CPPSRC) > $@
diff --git a/test/framework.py b/test/framework.py
index 54b7a2dfa5e..2bbb4ce44f7 100644
--- a/test/framework.py
+++ b/test/framework.py
@@ -265,8 +265,8 @@ class VppTestCase(unittest.TestCase):
c = os.getenv("CACHE_OUTPUT", "1")
cls.cache_vpp_output = False if c.lower() in ("n", "no", "0") else True
cls.set_debug_flags(d)
- cls.vpp_bin = os.getenv('VPP_TEST_BIN', "vpp")
- cls.plugin_path = os.getenv('VPP_TEST_PLUGIN_PATH')
+ cls.vpp_bin = os.getenv('VPP_BIN', "vpp")
+ cls.plugin_path = os.getenv('VPP_PLUGIN_PATH')
cls.extern_plugin_path = os.getenv('EXTERN_PLUGINS')
plugin_path = None
if cls.plugin_path is not None:
@@ -1073,7 +1073,7 @@ class VppTestResult(unittest.TestResult):
def symlink_failed(self):
if self.current_test_case_info:
try:
- failed_dir = os.getenv('VPP_TEST_FAILED_DIR')
+ failed_dir = os.getenv('FAILED_DIR')
link_path = os.path.join(
failed_dir,
'%s-FAILED' %
diff --git a/test/run_tests.py b/test/run_tests.py
index d72a74c2ee4..0978da0730c 100644
--- a/test/run_tests.py
+++ b/test/run_tests.py
@@ -68,8 +68,8 @@ class TestResult(dict):
def was_successful(self):
return 0 == len(self[FAIL]) == len(self[ERROR]) \
- and len(self[PASS] + self[SKIP]) \
- == self.testcase_suite.countTestCases() == len(self[TEST_RUN])
+ and len(self[PASS] + self[SKIP]) \
+ == self.testcase_suite.countTestCases() == len(self[TEST_RUN])
def no_tests_run(self):
return 0 == len(self[TEST_RUN])
@@ -232,7 +232,7 @@ def handle_failed_suite(logger, last_test_temp_dir, vpp_pid):
if last_test_temp_dir:
# Need to create link in case of a timeout or core dump without failure
lttd = os.path.basename(last_test_temp_dir)
- failed_dir = os.getenv('VPP_TEST_FAILED_DIR')
+ failed_dir = os.getenv('FAILED_DIR')
link_path = '%s%s-FAILED' % (failed_dir, lttd)
if not os.path.exists(link_path):
os.symlink(last_test_temp_dir, link_path)
@@ -750,10 +750,11 @@ if __name__ == '__main__':
filter_cb = FilterByTestOption(filter_file, filter_class, filter_func)
+ ignore_path = os.getenv("VENV_PATH", None)
cb = SplitToSuitesCallback(filter_cb)
for d in args.dir:
print("Adding tests from directory tree %s" % d)
- discover_tests(d, cb)
+ discover_tests(d, cb, ignore_path)
# suites are not hashable, need to use list
suites = []
diff --git a/test/test_jvpp.py b/test/test_jvpp.py
index 6151ebdbb20..595f03a3942 100644
--- a/test/test_jvpp.py
+++ b/test/test_jvpp.py
@@ -99,7 +99,7 @@ class TestJVpp(VppTestCase):
"{0}-{1}.jar".format(jar_name, version))
def jvpp_connection_test(self, api_jar_name, test_class_name, timeout):
- install_dir = os.getenv('VPP_TEST_BUILD_DIR')
+ install_dir = os.getenv('VPP_BUILD_DIR')
self.logger.info("Install directory : {0}".format(install_dir))
version_reply = self.vapi.show_version()
diff --git a/test/test_vapi.py b/test/test_vapi.py
index 50a34df01fe..35fb8e795b3 100644
--- a/test/test_vapi.py
+++ b/test/test_vapi.py
@@ -14,11 +14,11 @@ class VAPITestCase(VppTestCase):
def test_vapi_c(self):
""" run C VAPI tests """
- var = "BR"
+ var = "TEST_DIR"
built_root = os.getenv(var, None)
self.assertIsNotNone(built_root,
"Environment variable `%s' not set" % var)
- executable = "%s/vapi_test/vapi_c_test" % built_root
+ executable = "%s/build/vapi_test/vapi_c_test" % built_root
worker = Worker(
[executable, "vapi client", self.shm_prefix], self.logger)
worker.start()
@@ -44,11 +44,11 @@ class VAPITestCase(VppTestCase):
@unittest.skipIf(running_on_centos(), "Centos's gcc can't compile our C++")
def test_vapi_cpp(self):
""" run C++ VAPI tests """
- var = "BR"
+ var = "TEST_DIR"
built_root = os.getenv(var, None)
self.assertIsNotNone(built_root,
"Environment variable `%s' not set" % var)
- executable = "%s/vapi_test/vapi_cpp_test" % built_root
+ executable = "%s/build/vapi_test/vapi_cpp_test" % built_root
worker = Worker(
[executable, "vapi client", self.shm_prefix], self.logger)
worker.start()
diff --git a/test/test_vcl.py b/test/test_vcl.py
index 6027ba75e7d..2a36304876d 100644
--- a/test/test_vcl.py
+++ b/test/test_vcl.py
@@ -33,7 +33,7 @@ class VCLTestCase(VppTestCase):
""" VCL Test Class """
def __init__(self, methodName):
- var = "VPP_TEST_BUILD_DIR"
+ var = "VPP_BUILD_DIR"
self.build_dir = os.getenv(var, None)
if self.build_dir is None:
raise Exception("Environment variable `%s' not set" % var)
diff --git a/test/test_vom.py b/test/test_vom.py
index 3df8fe8dae2..6aba555a9c9 100644
--- a/test/test_vom.py
+++ b/test/test_vom.py
@@ -14,11 +14,11 @@ class VOMTestCase(VppTestCase):
def test_vom_cpp(self):
""" run C++ VOM tests """
- var = "BR"
+ var = "TEST_DIR"
built_root = os.getenv(var, None)
self.assertIsNotNone(built_root,
"Environment variable `%s' not set" % var)
- executable = "%s/vom_test/vom_test" % built_root
+ executable = "%s/build/vom_test/vom_test" % built_root
worker = Worker(
[executable, "vpp object model", self.shm_prefix], self.logger)
worker.start()
diff --git a/test/vpp_papi_provider.py b/test/vpp_papi_provider.py
index 91e46df1bf3..966d9198fa0 100644
--- a/test/vpp_papi_provider.py
+++ b/test/vpp_papi_provider.py
@@ -80,7 +80,7 @@ class VppPapiProvider(object):
self._expect_stack = []
jsonfiles = []
- install_dir = os.getenv('VPP_TEST_INSTALL_PATH')
+ install_dir = os.getenv('VPP_INSTALL_PATH')
for root, dirnames, filenames in os.walk(install_dir):
for filename in fnmatch.filter(filenames, '*.api.json'):
jsonfiles.append(os.path.join(root, filename))