diff options
author | Ole Troan <ot@cisco.com> | 2019-10-23 11:47:33 +0200 |
---|---|---|
committer | Paul Vinciguerra <pvinci@vinciconsulting.com> | 2019-10-28 10:11:29 +0000 |
commit | 4aacc01f2ec95ff0a6bbc04c3c573ab5936c9489 (patch) | |
tree | 6c092e9c8f5790454a5177918bddc25902b65497 | |
parent | 63cb8827e586f02f53512d23a8e7596fe9c19aa8 (diff) |
tests: switch test framework to python3 by default
Type: make
Signed-off-by: Ole Troan <ot@cisco.com>
Change-Id: I84d32f022d9dc555837c8916feba04a224cd262a
-rw-r--r-- | test/Makefile | 12 | ||||
-rw-r--r-- | test/test_stats_client.py | 2 |
2 files changed, 7 insertions, 7 deletions
diff --git a/test/Makefile b/test/Makefile index abc611c44d9..7ec8d4a08c6 100644 --- a/test/Makefile +++ b/test/Makefile @@ -78,7 +78,7 @@ TEST_RUN_DIR:=$(VENV_PATH)/run endif ifeq ($(PYTHON),) -PYTHON_INTERP=python2.7 +PYTHON_INTERP=python3.6 else PYTHON_INTERP=$(PYTHON) endif @@ -234,8 +234,8 @@ wipe: reset @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 && \ + $(PYTHON_INTERP) -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 @@ -267,9 +267,9 @@ papi-wipe: @rm -rf $(PAPI_INSTALL_DONE) .PHONY: checkstyle -checkstyle: verify-test-dir - @virtualenv $(VENV_PATH) -p python3 - @bash -c "source $(VENV_PATH)/bin/activate && python3 -m pip install pycodestyle" +checkstyle: verify-test-dir $(PIP_INSTALL_DONE) + @bash -c "source $(VENV_PATH)/bin/activate &&\ + $(PYTHON_INTERP) -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 $(PLUGIN_SRC_DIR)/*/test/*.py ||\ (echo \"*******************************************************************\" &&\ diff --git a/test/test_stats_client.py b/test/test_stats_client.py index dcbf0fedbc0..857e6e42832 100644 --- a/test/test_stats_client.py +++ b/test/test_stats_client.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2.7 +#!/usr/bin/env python import unittest import time |