Commit 2690c044 by Calen Pennington

Only generate xunit files during CI builds, so that pudb works during development

parent 6b61bc44
......@@ -38,7 +38,6 @@ class TestPaverBokChoyCmd(unittest.TestCase):
"VERIFY_XSS='{}'".format(verify_xss),
"nosetests",
"{}/common/test/acceptance/{}".format(REPO_DIR, name),
"--with-xunit",
"--xunit-file={}/reports/bok_choy{}/xunit.xml".format(REPO_DIR, shard_str),
"--verbosity=2",
]
......@@ -119,7 +118,6 @@ class TestPaverBokChoyCmd(unittest.TestCase):
Using 1 process means paver should ask for the traditional xunit plugin for plugin results
"""
expected_verbosity_command = [
"--with-xunit",
"--xunit-file={repo_dir}/reports/bok_choy{shard_str}/xunit.xml".format(
repo_dir=REPO_DIR,
shard_str='/shard_' + self.shard if self.shard else ''
......@@ -136,7 +134,6 @@ class TestPaverBokChoyCmd(unittest.TestCase):
"""
process_count = 2
expected_verbosity_command = [
"--with-xunitmp",
"--xunitmp-file={repo_dir}/reports/bok_choy{shard_str}/xunit.xml".format(
repo_dir=REPO_DIR,
shard_str='/shard_' + self.shard if self.shard else '',
......@@ -154,7 +151,6 @@ class TestPaverBokChoyCmd(unittest.TestCase):
"""
process_count = 3
expected_verbosity_command = [
"--with-xunitmp",
"--xunitmp-file={repo_dir}/reports/bok_choy{shard_str}/xunit.xml".format(
repo_dir=REPO_DIR,
shard_str='/shard_' + self.shard if self.shard else '',
......
......@@ -34,8 +34,7 @@ class AcceptanceTest(TestSuite):
def cmd(self):
report_file = self.report_dir / "{}.xml".format(self.system)
report_args = ["--with-xunit", "--xunit-file {}".format(report_file)]
report_args = ["--xunit-file {}".format(report_file)]
return [
"DEFAULT_STORE={}".format(self.default_store),
"./manage.py",
......
......@@ -133,7 +133,6 @@ class BokChoyTestSuite(TestSuite):
if self.num_processes != 1:
# Construct "multiprocess" nosetest command
command = [
"--with-xunitmp",
"--xunitmp-file={}".format(self.xunit_report),
"--processes={}".format(self.num_processes),
"--no-color",
......@@ -142,7 +141,6 @@ class BokChoyTestSuite(TestSuite):
else:
command = [
"--with-xunit",
"--xunit-file={}".format(self.xunit_report),
"--verbosity={}".format(self.verbosity),
]
......
......@@ -153,7 +153,6 @@ class SystemTestSuite(NoseTestSuite):
] + self.test_options_flags + [
'--settings=test',
self.extra_args,
'--with-xunitmp',
'--xunitmp-file={}'.format(self.report_dir / "nosetests.xml"),
'--with-database-isolation',
]
......@@ -217,7 +216,6 @@ class LibTestSuite(NoseTestSuite):
"--id-file={}".format(self.test_ids),
self.test_id,
] + self.test_options_flags + [
"--with-xunit",
"--xunit-file={}".format(self.xunit_report),
self.extra_args,
"--verbosity={}".format(self.verbosity),
......
......@@ -16,7 +16,7 @@ echo "Setting up for accessibility tests..."
source scripts/jenkins-common.sh
echo "Running explicit accessibility tests..."
SELENIUM_BROWSER=phantomjs paver test_a11y
SELENIUM_BROWSER=phantomjs paver test_a11y --with-xunitmp
echo "Generating coverage report..."
paver a11y_coverage
......
......@@ -37,11 +37,11 @@ if [ "$CIRCLE_NODE_TOTAL" == "1" ] ; then
echo "via the CircleCI UI and adjust scripts/circle-ci-tests.sh to match."
echo "Running tests for common/lib/ and pavelib/"
paver test_lib --with-flaky --cov-args="-p" || EXIT=1
paver test_lib --with-flaky --cov-args="-p" --with-xunitmp || EXIT=1
echo "Running python tests for Studio"
paver test_system -s cms --with-flaky --cov-args="-p" || EXIT=1
paver test_system -s cms --with-flaky --cov-args="-p" --with-xunitmp || EXIT=1
echo "Running python tests for lms"
paver test_system -s lms --with-flaky --cov-args="-p" || EXIT=1
paver test_system -s lms --with-flaky --cov-args="-p" --with-xunitmp || EXIT=1
exit $EXIT
else
......@@ -74,15 +74,15 @@ else
;;
1) # run all of the lms unit tests
paver test_system -s lms --with-flaky --cov-args="-p"
paver test_system -s lms --with-flaky --cov-args="-p" --with-xunitmp
;;
2) # run all of the cms unit tests
paver test_system -s cms --with-flaky --cov-args="-p"
paver test_system -s cms --with-flaky --cov-args="-p" --with-xunitmp
;;
3) # run the commonlib unit tests
paver test_lib --with-flaky --cov-args="-p"
paver test_lib --with-flaky --cov-args="-p" --with-xunitmp
;;
*)
......
......@@ -99,7 +99,7 @@ case "$TEST_SUITE" in
;;
"lms-unit")
PAVER_ARGS="--with-flaky --processes=-1 --cov-args='-p' -v"
PAVER_ARGS="--with-flaky --processes=-1 --cov-args='-p' -v --with-xunitmp"
case "$SHARD" in
"all")
paver test_system -s lms $PAVER_ARGS
......@@ -128,11 +128,11 @@ case "$TEST_SUITE" in
;;
"cms-unit")
paver test_system -s cms --with-flaky --cov-args="-p" -v
paver test_system -s cms --with-flaky --cov-args="-p" -v --with-xunitmp
;;
"commonlib-unit")
paver test_lib --with-flaky --cov-args="-p" -v
paver test_lib --with-flaky --cov-args="-p" -v --with-xunitmp
;;
"js-unit")
......@@ -142,7 +142,7 @@ case "$TEST_SUITE" in
"commonlib-js-unit")
paver test_js --coverage --skip-clean || { EXIT=1; }
paver test_lib --skip-clean --with-flaky --cov-args="-p" || { EXIT=1; }
paver test_lib --skip-clean --with-flaky --cov-args="-p" --with-xunitmp || { EXIT=1; }
# This is to ensure that the build status of the shard is properly set.
# Because we are running two paver commands in a row, we need to capture
......@@ -159,11 +159,11 @@ case "$TEST_SUITE" in
;;
"lms-acceptance")
paver test_acceptance -s lms -vvv
paver test_acceptance -s lms -vvv --with-xunit
;;
"cms-acceptance")
paver test_acceptance -s cms -vvv
paver test_acceptance -s cms -vvv --with-xunit
;;
"bok-choy")
......@@ -174,46 +174,48 @@ case "$TEST_SUITE" in
cp -R $HOME/firefox/ firefox/
export SELENIUM_FIREFOX_PATH=firefox/firefox
PAVER_ARGS="-n $NUMBER_OF_BOKCHOY_THREADS --with-flaky --with-xunitmp"
case "$SHARD" in
"all")
paver test_bokchoy
paver test_bokchoy $PAVER_ARGS
;;
"1")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_1' --with-flaky
paver test_bokchoy --attr='shard_1' $PAVER_ARGS
;;
"2")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_2' --with-flaky
paver test_bokchoy --attr='shard_2' $PAVER_ARGS
;;
"3")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_3' --with-flaky
paver test_bokchoy --attr='shard_3' $PAVER_ARGS
;;
"4")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_4' --with-flaky
paver test_bokchoy --attr='shard_4' $PAVER_ARGS
;;
"5")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_5' --with-flaky
paver test_bokchoy --attr='shard_5' $PAVER_ARGS
;;
"6")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_6' --with-flaky
paver test_bokchoy --attr='shard_6' $PAVER_ARGS
;;
"7")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_7' --with-flaky
paver test_bokchoy --attr='shard_7' $PAVER_ARGS
;;
"8")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_8' --with-flaky
paver test_bokchoy --attr='shard_8' $PAVER_ARGS
;;
"9")
paver test_bokchoy -n $NUMBER_OF_BOKCHOY_THREADS --attr='shard_1=False,shard_2=False,shard_3=False,shard_4=False,shard_5=False,shard_6=False,shard_7=False,shard_8=False,a11y=False' --with-flaky
paver test_bokchoy --attr='shard_1=False,shard_2=False,shard_3=False,shard_4=False,shard_5=False,shard_6=False,shard_7=False,shard_8=False,a11y=False' $PAVER_ARGS
;;
# Default case because if we later define another bok-choy shard on Jenkins
......
[nosetests]
logging-clear-handlers=1
with-xunitmp=1
with-ignore-docstrings=1
exclude-dir=lms/envs
cms/envs
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment