summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdam Young <ayoung@redhat.com>2013-02-27 16:46:36 -0500
committerAdam Young <ayoung@redhat.com>2013-02-27 16:51:51 -0500
commit9fa6e0a206f1e998e1c2c0efabb2cbfe4b11439e (patch)
tree01e3bec43245f7b029d5b26b283061204031a277
parent4769d1008228337daff077079c6e5e099853c6f4 (diff)
command line switch for short pep8 output.
Change-Id: I65e9ce051012b3afc9a088423f9d805927604331
-rwxr-xr-xrun_tests.sh18
1 files changed, 17 insertions, 1 deletions
diff --git a/run_tests.sh b/run_tests.sh
index 915de147..bfa2dbcc 100755
--- a/run_tests.sh
+++ b/run_tests.sh
@@ -51,6 +51,7 @@ function process_option {
-f|--force) force=1;;
-u|--update) update=1;;
-p|--pep8) just_pep8=1;;
+ -8|--8) short_pep8=1;;
-P|--no-pep8) no_pep8=1;;
-c|--coverage) coverage=1;;
-xintegration) nokeystoneclient=1;;
@@ -71,6 +72,7 @@ noseargs=
noseopts=
wrapper=""
just_pep8=0
+short_pep8=0
no_pep8=0
coverage=0
nokeystoneclient=0
@@ -108,6 +110,14 @@ function run_tests {
}
function run_pep8 {
+ FLAGS=--show-pep8
+ echo $#
+ if [ $# -gt 0 ] && [ 'short' == ''$1 ]
+ then
+ FLAGS=''
+ fi
+
+
echo "Running pep8 ..."
# Opt-out files from pep8
ignore_scripts="*.pyc,*.pyo,*.sh,*.swp,*.rst"
@@ -116,7 +126,7 @@ function run_pep8 {
ignore="$ignore_scripts,$ignore_files,$ignore_dirs"
srcfiles="."
# Just run PEP8 in current environment
- ${wrapper} pep8 --repeat --show-pep8 --show-source \
+ ${wrapper} pep8 --repeat $FLAGS --show-source \
--exclude=${ignore} ${srcfiles} | tee pep8.txt
}
@@ -162,6 +172,12 @@ if [ $just_pep8 -eq 1 ]; then
exit
fi
+if [ $short_pep8 -eq 1 ]; then
+ run_pep8 short
+ exit
+fi
+
+
if [ $recreate_db -eq 1 ]; then
rm -f tests.sqlite
fi