From 6646dfc5123ec5eeffa234785d3bcd166ffb25f0 Mon Sep 17 00:00:00 2001 From: Arvind Somy Date: Fri, 17 Jun 2011 14:02:24 -0400 Subject: [PATCH 01/50] Fix for Bug lp:796813 - Adding support for distributed virtual portgroups on vmware ESX(i) --- Authors | 1 + 1 file changed, 1 insertion(+) diff --git a/Authors b/Authors index 94fcf7f5..0d79af2c 100644 --- a/Authors +++ b/Authors @@ -6,6 +6,7 @@ Anne Gentle Anthony Young Antony Messerli Armando Migliaccio +Arvind Somya Bilal Akhtar Brian Lamar Brian Schott From a87bdf55764ac565b5a539fc906925a84c274abb Mon Sep 17 00:00:00 2001 From: Mohammed Naser Date: Sat, 9 Jul 2011 22:00:27 -0400 Subject: [PATCH 08/50] Added myself to authors file --- Authors | 1 + 1 file changed, 1 insertion(+) diff --git a/Authors b/Authors index 1b3c9076..3548c092 100644 --- a/Authors +++ b/Authors @@ -62,6 +62,7 @@ Masanori Itoh Matt Dietz Michael Gundlach Mike Scherbakov +Mohammed Naser Monsyne Dragon Monty Taylor MORITA Kazutaka From c72a3e263f0b42d121746ab92cc523a0af594b8e Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Tue, 19 Jul 2011 10:52:38 -0400 Subject: [PATCH 12/50] Add support for generating local code coverage report --- .bzrignore | 2 ++ run_tests.sh | 14 ++++++++++++++ 2 files changed, 16 insertions(+) diff --git a/.bzrignore b/.bzrignore index 14d8028f..583fd551 100644 --- a/.bzrignore +++ b/.bzrignore @@ -13,3 +13,5 @@ nova/vcsversion.py clean.sqlite run_tests.log tests.sqlite +.coverage +covhtml diff --git a/run_tests.sh b/run_tests.sh index b8078e15..ea0d7557 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -11,6 +11,7 @@ function usage { echo " -x, --stop Stop running tests after the first error or failure." echo " -f, --force Force a clean re-build of the virtual environment. Useful when dependencies have been added." echo " -p, --pep8 Just run pep8" + echo " -c, --coverage Generate coverage report" echo " -h, --help Print this usage message" echo " --hide-elapsed Don't print the elapsed time for each test along with slow test list" echo "" @@ -29,6 +30,7 @@ function process_option { -n|--no-recreate-db) let recreate_db=0;; -f|--force) let force=1;; -p|--pep8) let just_pep8=1;; + -c|--coverage) let coverage=1;; -*) noseopts="$noseopts $1";; *) noseargs="$noseargs $1" esac @@ -43,12 +45,18 @@ noseargs= noseopts= wrapper="" just_pep8=0 +coverage=0 recreate_db=1 for arg in "$@"; do process_option $arg done +if [ $coverage -eq 1 ]; then + ${wrapper} coverage erase + noseopts="$noseopts --with-coverage --cover-package=nova" +fi + function run_tests { # Just run the test suites in current environment ${wrapper} $NOSETESTS 2> run_tests.log @@ -117,6 +125,7 @@ if [ $recreate_db -eq 1 ]; then rm -f tests.sqlite fi + run_tests || exit # NOTE(sirp): we only want to run pep8 when we're running the full-test suite, @@ -126,3 +135,8 @@ run_tests || exit if [ -z "$noseargs" ]; then run_pep8 fi + +if [ $coverage -eq 1 ]; then + echo "Generating coverage report in covhtml/" + coverage html -d covhtml -i +fi From c2e3df28c28c4fa84334a600f547c83c7304fe2e Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Tue, 19 Jul 2011 11:04:36 -0400 Subject: [PATCH 13/50] Zapped an extra newline --- run_tests.sh | 1 - 1 file changed, 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index ea0d7557..d27a2dc7 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -125,7 +125,6 @@ if [ $recreate_db -eq 1 ]; then rm -f tests.sqlite fi - run_tests || exit # NOTE(sirp): we only want to run pep8 when we're running the full-test suite, From 3d8d2595fafb5910e9c1811b527c34ed1b961185 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Thu, 21 Jul 2011 10:30:55 -0400 Subject: [PATCH 15/50] Fixed an issue where was invoked before it was defined in the case of a venv --- run_tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index d27a2dc7..9b080e19 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -52,8 +52,8 @@ for arg in "$@"; do process_option $arg done +# If enabled, tell nose to collect coverage data if [ $coverage -eq 1 ]; then - ${wrapper} coverage erase noseopts="$noseopts --with-coverage --cover-package=nova" fi @@ -116,6 +116,11 @@ then fi fi +# Delete old coverage data from previous runs +if [ $coverage -eq 1 ]; then + ${wrapper} coverage erase +fi + if [ $just_pep8 -eq 1 ]; then run_pep8 exit From 81cfe26a588603529bff0be65e9c34c7fa2ffe58 Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Thu, 21 Jul 2011 10:43:20 -0400 Subject: [PATCH 16/50] Added call to second coverage invocation --- run_tests.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/run_tests.sh b/run_tests.sh index 9b080e19..2034df82 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -142,5 +142,5 @@ fi if [ $coverage -eq 1 ]; then echo "Generating coverage report in covhtml/" - coverage html -d covhtml -i + ${wrapper} coverage html -d covhtml -i fi From b702d7bd636271d89a6baedad832d414f19b1bdd Mon Sep 17 00:00:00 2001 From: Lorin Hochstein Date: Thu, 21 Jul 2011 10:47:34 -0400 Subject: [PATCH 17/50] Slight indentation change --- run_tests.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/run_tests.sh b/run_tests.sh index 2034df82..8f2b5175 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -141,6 +141,6 @@ if [ -z "$noseargs" ]; then fi if [ $coverage -eq 1 ]; then - echo "Generating coverage report in covhtml/" - ${wrapper} coverage html -d covhtml -i + echo "Generating coverage report in covhtml/" + ${wrapper} coverage html -d covhtml -i fi