[Libreoffice-commits] core.git: solenv/gbuild

Miklos Vajna vmiklos at collabora.co.uk
Thu Dec 21 17:18:29 UTC 2017


 solenv/gbuild/PythonTest.mk                       |    2 +-
 solenv/gbuild/platform/unittest-failed-MACOSX.sh  |   13 +++++++++++++
 solenv/gbuild/platform/unittest-failed-WNT.sh     |   13 +++++++++++++
 solenv/gbuild/platform/unittest-failed-default.sh |   13 +++++++++++++
 4 files changed, 40 insertions(+), 1 deletion(-)

New commits:
commit c48b87e6e6c23152135c73dddb63c1be9cc321fc
Author: Miklos Vajna <vmiklos at collabora.co.uk>
Date:   Thu Dec 21 13:41:19 2017 +0100

    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 at collabora.co.uk>
    Tested-by: Jenkins <ci at libreoffice.org>

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
 


More information about the Libreoffice-commits mailing list