refactor!: delete common/lib and related usages

This commit is contained in:
UsamaSadiq
2022-08-25 16:31:47 +05:00
committed by Usama Sadiq
parent 96f6174d9e
commit 897cb3617f
40 changed files with 92 additions and 228 deletions

View File

@@ -15,7 +15,7 @@ set -e
#
# - "lms-unit": Run the LMS Python unit tests
# - "cms-unit": Run the CMS Python unit tests
# - "commonlib-unit": Run Python unit tests from the common/lib directory
# - "pavelib-unit": Run Python unit tests from the pavelib/paver_tests directory
#
# `SHARD` is a number indicating which subset of the tests to build.
#
@@ -109,27 +109,27 @@ case "${TEST_SUITE}" in
esac
;;
"commonlib-unit")
"pavelib-unit")
case "$SHARD" in
"all")
paver test_lib --disable_capture ${PAVER_ARGS} ${PARALLEL} 2> common-tests.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib
paver test_lib --disable_capture ${PAVER_ARGS} ${PARALLEL} 2> pavelib-tests.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.pavelib
;;
[1-2])
paver test_lib -l ./xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> common-tests.${SHARD}.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib.${SHARD}
paver test_lib -l ./xmodule --disable_capture --eval-attr="shard==$SHARD" ${PAVER_ARGS} 2> pavelib-tests.${SHARD}.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.pavelib.${SHARD}
;;
3|"noshard")
paver test_lib --disable_capture --eval-attr="shard>=$SHARD or not shard" ${PAVER_ARGS} 2> common-tests.3.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.commonlib.3
paver test_lib --disable_capture --eval-attr="shard>=$SHARD or not shard" ${PAVER_ARGS} 2> pavelib-tests.3.log
mv reports/${TEST_SUITE}.coverage reports/.coverage.pavelib.3
;;
*)
# If no shard is specified, rather than running all tests, create an empty xunit file. This is a
# backwards compatibility feature. If a new shard (e.g., shard n) is introduced in the build
# system, but the tests are called with the old code, then builds will not fail because the
# code is out of date. Instead, there will be an instantly-passing shard.
mkdir -p reports/common
emptyxunit "common/nosetests"
mkdir -p reports/pavelib
emptyxunit "pavelib/nosetests"
;;
esac
;;