Clean up a few ugly bits from the testing patch.
The pep8 runner in run_tests.sh was still referencing run_tests.py which no longer exists. Replaced that section with one that runs pep8 the same way as tox. Additionally, the first attempt at getting the test runner to do the same thing with debug logging as run_tests.sh was doing became a bit spammy. For now, actually have logging write out the log file in the first place. Eventually, it would be nice to get this to properly get spit out in such a way that nosetests would grab it and include it in the failed test case output. Change-Id: Ib5222a0c3507d5d7ede4d303c98323a622705301
This commit is contained in:
parent
90579894d2
commit
de2a8a8d94
|
@ -23,7 +23,7 @@ setattr(__builtin__, '_', lambda x: x)
|
|||
# Set up logging to output debugging
|
||||
import logging
|
||||
logger = logging.getLogger()
|
||||
hdlr = logging.StreamHandler()
|
||||
hdlr = logging.FileHandler('run_tests.log', 'w')
|
||||
formatter = logging.Formatter('%(asctime)s %(levelname)s %(message)s')
|
||||
hdlr.setFormatter(formatter)
|
||||
logger.addHandler(hdlr)
|
||||
|
|
|
@ -53,13 +53,14 @@ done
|
|||
function run_tests {
|
||||
# Just run the test suites in current environment
|
||||
${wrapper} rm -f tests.sqlite
|
||||
${wrapper} $NOSETESTS 2> run_tests.log
|
||||
${wrapper} $NOSETESTS
|
||||
}
|
||||
|
||||
function run_pep8 {
|
||||
echo "Running pep8 ..."
|
||||
PEP8_EXCLUDE=".venv,.tox,dist,doc"
|
||||
PEP8_OPTIONS="--exclude=$PEP8_EXCLUDE --repeat"
|
||||
PEP8_INCLUDE="bin/* glance tools setup.py run_tests.py"
|
||||
PEP8_INCLUDE="."
|
||||
${wrapper} pep8 $PEP8_OPTIONS $PEP8_INCLUDE
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue