Switch run_tests.sh to run in parallel by default
This commit switches run_test.sh to run in parallel by default. Since
the tox jobs were moved to parallel by default run_tests.sh should
have the same behavior.
Change-Id: Id144725bfd22d72adbad62772c7496b843dfece8
diff --git a/run_tests.sh b/run_tests.sh
index f995cde..856ce54 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -11,7 +11,7 @@
echo " -u, --update Update the virtual environment with any newer package versions"
echo " -s, --smoke Only run smoke tests"
echo " -w, --whitebox Only run whitebox tests"
- echo " -t, --parallel Run testr parallel"
+ echo " -t, --serial Run testr serially"
echo " -c, --nova-coverage Enable Nova coverage collection"
echo " -C, --config Config file location"
echo " -p, --pep8 Just run pep8"
@@ -26,7 +26,7 @@
just_pep8=0
venv=.venv
with_venv=tools/with_venv.sh
-parallel=0
+serial=0
always_venv=0
never_venv=0
no_site_packages=0
@@ -38,7 +38,7 @@
logging=0
logging_config=etc/logging.conf
-if ! options=$(getopt -o VNnfuswtcphdC:lL: -l virtual-env,no-virtual-env,no-site-packages,force,update,smoke,whitebox,parallel,nova-coverage,pep8,help,debug,config:,logging,logging-config: -- "$@")
+if ! options=$(getopt -o VNnfuswtcphdC:lL: -l virtual-env,no-virtual-env,no-site-packages,force,update,smoke,whitebox,serial,nova-coverage,pep8,help,debug,config:,logging,logging-config: -- "$@")
then
# parse error
usage
@@ -61,7 +61,7 @@
-p|--pep8) let just_pep8=1;;
-s|--smoke) testrargs="$testrargs smoke";;
-w|--whitebox) testrargs="$testrargs whitebox";;
- -t|--parallel) parallel=1;;
+ -t|--serial) serial=1;;
-l|--logging) logging=1;;
-L|--logging-config) logging_config=$2; shift;;
--) [ "yes" == "$first_uu" ] || testrargs="$testrargs $1"; first_uu=no ;;
@@ -101,10 +101,10 @@
function run_tests {
testr_init
${wrapper} find . -type f -name "*.pyc" -delete
- if [ $parallel -eq 1 ]; then
- ${wrapper} testr run --parallel --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
- else
+ if [ $serial -eq 1 ]; then
${wrapper} testr run --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
+ else
+ ${wrapper} testr run --parallel --subunit $testrargs | ${wrapper} subunit-2to1 | ${wrapper} tools/colorizer.py
fi
}