diff options
author | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-21 13:41:19 +0100 |
---|---|---|
committer | Miklos Vajna <vmiklos@collabora.co.uk> | 2017-12-21 18:18:09 +0100 |
commit | c48b87e6e6c23152135c73dddb63c1be9cc321fc (patch) | |
tree | 8c4fecbd99871749531bdf3cf0e329c2ab0fc455 /solenv/gbuild | |
parent | 7cf4eeed81fd333c87dedffa792f5d547b7981f0 (diff) |
solenv: support PYTHON_TEST_NAME for python tests
This is similar to CPPUNIT_TEST_NAME for CppunitTests, i.e. allows running a
single module/class/method only, instead of all modules added by
gb_PythonTest_add_modules.
Example:
make PythonTest_sw_python PYTHON_TEST_NAME="text_portion_enumeration_test.TextPortionEnumerationTest.test_empty2"
Change-Id: Ibed5729bc29a5112216bce211455d6c6a0837b30
Reviewed-on: https://gerrit.libreoffice.org/46907
Reviewed-by: Miklos Vajna <vmiklos@collabora.co.uk>
Tested-by: Jenkins <ci@libreoffice.org>
Diffstat (limited to 'solenv/gbuild')
-rw-r--r-- | solenv/gbuild/PythonTest.mk | 2 | ||||
-rwxr-xr-x | solenv/gbuild/platform/unittest-failed-MACOSX.sh | 13 | ||||
-rwxr-xr-x | solenv/gbuild/platform/unittest-failed-WNT.sh | 13 | ||||
-rwxr-xr-x | solenv/gbuild/platform/unittest-failed-default.sh | 13 |
4 files changed, 40 insertions, 1 deletions
diff --git a/solenv/gbuild/PythonTest.mk b/solenv/gbuild/PythonTest.mk index 8ac62c43f445..7ee833a730fc 100644 --- a/solenv/gbuild/PythonTest.mk +++ b/solenv/gbuild/PythonTest.mk @@ -57,7 +57,7 @@ else )) \ $(gb_CppunitTest_GDBTRACE) $(gb_CppunitTest_VALGRINDTOOL) \ $(gb_PythonTest_COMMAND) \ - $(MODULES) \ + $(if $(PYTHON_TEST_NAME),$(PYTHON_TEST_NAME),$(MODULES)) \ $(if $(gb_CppunitTest__interactive),, \ > $@.log 2>&1 \ || ($(if $(value gb_CppunitTest_postprocess), \ diff --git a/solenv/gbuild/platform/unittest-failed-MACOSX.sh b/solenv/gbuild/platform/unittest-failed-MACOSX.sh index 0e7eab798398..7994dbd56b01 100755 --- a/solenv/gbuild/platform/unittest-failed-MACOSX.sh +++ b/solenv/gbuild/platform/unittest-failed-MACOSX.sh @@ -24,9 +24,22 @@ make $1Test_$2 VALGRIND=memcheck # for memory checking You can limit the execution to just one particular test by: +EOF + +case $1 in + Python) + cat << EOF +make $1Test_$2 PYTHON_TEST_NAME="testXYZ" ...above mentioned params... + +EOF + ;; + *) + cat << EOF make $1Test_$2 CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params... EOF + ;; +esac exit 1 diff --git a/solenv/gbuild/platform/unittest-failed-WNT.sh b/solenv/gbuild/platform/unittest-failed-WNT.sh index d5df28ce186c..5ace1f0d1d95 100755 --- a/solenv/gbuild/platform/unittest-failed-WNT.sh +++ b/solenv/gbuild/platform/unittest-failed-WNT.sh @@ -25,9 +25,22 @@ make $1Test_$2 CPPUNITTRACE="drmemory -free_max_frames 20" # for memory checking You can limit the execution to just one particular test by: +EOF + +case $1 in + Python) + cat << EOF +make $1Test_$2 PYTHON_TEST_NAME="testXYZ" ...above mentioned params... + +EOF + ;; + *) + cat << EOF make $1Test_$2 CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params... EOF + ;; +esac exit 1 diff --git a/solenv/gbuild/platform/unittest-failed-default.sh b/solenv/gbuild/platform/unittest-failed-default.sh index 2ec0c40fe92d..1e742fd7f16d 100755 --- a/solenv/gbuild/platform/unittest-failed-default.sh +++ b/solenv/gbuild/platform/unittest-failed-default.sh @@ -29,9 +29,22 @@ make $1Test_$2 DEBUGCPPUNIT=TRUE You can limit the execution to just one particular test by: +EOF + +case $1 in + Python) + cat << EOF +make PYTHON_TEST_NAME="testXYZ" ...above mentioned params... + +EOF + ;; + *) + cat << EOF make CPPUNIT_TEST_NAME="testXYZ" ...above mentioned params... EOF + ;; +esac exit 1 |