From 309a506c1ebf37376ded5d9b2f297f22be2f9478 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Fri, 2 Aug 2013 21:01:26 +0000 Subject: [PATCH] Stop comparing tests counts * modules/jenkins/files/slave_scripts/run-tox.sh: This didn't work reliably, and also becomes very hard to get right between system and non-system python interpreters. Also undo workarounds we added earlier in the 983ca11 change. Change-Id: I48ddfb908b6a7cae9751ecc0c8b7fc56ed5a5e50 --- modules/jenkins/files/slave_scripts/run-tox.sh | 17 +---------------- .../jenkins/files/slave_scripts/subunit2html.py | 2 +- 2 files changed, 2 insertions(+), 17 deletions(-) diff --git a/modules/jenkins/files/slave_scripts/run-tox.sh b/modules/jenkins/files/slave_scripts/run-tox.sh index faee75826d..085cbf6c09 100755 --- a/modules/jenkins/files/slave_scripts/run-tox.sh +++ b/modules/jenkins/files/slave_scripts/run-tox.sh @@ -59,24 +59,9 @@ if [ -d ".testrepository" ] ; then elif [ -f ".testrepository/0" ] ; then cp .testrepository/0 ./subunit_log.txt fi - export PYTHON=.tox/$venv/bin/python - /usr/local/jenkins/slave_scripts/subunit2html.py ./subunit_log.txt testr_results.html + .tox/$venv/bin/python /usr/local/jenkins/slave_scripts/subunit2html.py ./subunit_log.txt testr_results.html gzip -9 ./subunit_log.txt gzip -9 ./testr_results.html - - set -e - foundcount=$(.tox/$venv/bin/testr list-tests | sed -e '1d' | wc -l) - rancount=$(.tox/$venv/bin/testr last | sed -ne 's/Ran \([0-9]\+\).*tests in.*/\1/p') - if [ "$rancount" -lt "$foundcount" ] ; then - echo - echo "The number of tests found was greater than the number of tests" - echo "that were run. This indicates a fatal error occured while" - echo "running the tests." - echo "Tests found: $foundcount Tests ran: $rancount" - echo - exit 1 - fi - set +e fi sudo /usr/local/jenkins/slave_scripts/jenkins-sudo-grep.sh post diff --git a/modules/jenkins/files/slave_scripts/subunit2html.py b/modules/jenkins/files/slave_scripts/subunit2html.py index 4cfdc9c59e..9e5660e0d7 100755 --- a/modules/jenkins/files/slave_scripts/subunit2html.py +++ b/modules/jenkins/files/slave_scripts/subunit2html.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/python """ Utility to convert a subunit stream to an html results file. Code is adapted from the pyunit Html test runner at