diff options
-rwxr-xr-x | run_tests.sh | 3 | ||||
-rw-r--r-- | tests/ci/cover.sh | 6 | ||||
-rwxr-xr-x | yardstick/cmd/NSBperf.py | 7 |
3 files changed, 9 insertions, 7 deletions
diff --git a/run_tests.sh b/run_tests.sh index 2519d94f6..2cf54c708 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -13,6 +13,9 @@ getopts ":f" FILE_OPTION +# don't write .pyc files this can cause odd unittest results +export PYTHONDONTWRITEBYTECODE=1 + run_flake8() { echo "Running flake8 ... " logfile=test_results.log diff --git a/tests/ci/cover.sh b/tests/ci/cover.sh index 71833757a..6e4d608d9 100644 --- a/tests/ci/cover.sh +++ b/tests/ci/cover.sh @@ -34,6 +34,9 @@ run_coverage_test() { git checkout HEAD^ baseline_report=$(mktemp -t yardstick_coverageXXXXXXX) + # workaround 'db type could not be determined' bug + # https://bugs.launchpad.net/testrepository/+bug/1229445 + rm -f .testrepository/times.dbm find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*" coverage report > $baseline_report baseline_missing=$(awk 'END { print $3 }' $baseline_report) @@ -44,6 +47,9 @@ run_coverage_test() { # Generate and save coverage report current_report=$(mktemp -t yardstick_coverageXXXXXXX) + # workaround 'db type could not be determined' bug + # https://bugs.launchpad.net/testrepository/+bug/1229445 + rm -f .testrepository/times.dbm find . -type f -name "*.pyc" -delete && python setup.py testr --coverage --testr-args="$*" coverage report > $current_report current_missing=$(awk 'END { print $3 }' $current_report) diff --git a/yardstick/cmd/NSBperf.py b/yardstick/cmd/NSBperf.py index 4e7590ea5..2dc0f65e7 100755 --- a/yardstick/cmd/NSBperf.py +++ b/yardstick/cmd/NSBperf.py @@ -30,13 +30,6 @@ from six.moves import input CLI_PATH = os.path.dirname(os.path.realpath(__file__)) REPO_PATH = os.path.abspath(os.path.join(CLI_PATH, os.pardir)) -PYTHONPATH = os.environ.get("PYTHONPATH", False) -VIRTUAL_ENV = os.environ.get("VIRTUAL_ENV", False) - - -if not PYTHONPATH or not VIRTUAL_ENV: - print("Please setup env PYTHONPATH & VIRTUAL_ENV environment varaible.") - raise SystemExit(1) def sigint_handler(*args, **kwargs): |