]> granicus.if.org Git - icu/commitdiff
ICU-21751 Improves failure reporting of the run-with-stubdata CI target and
authorgnrunge <nrunge@google.com>
Wed, 22 Sep 2021 22:36:03 +0000 (15:36 -0700)
committerNorbert Runge <41129501+gnrunge@users.noreply.github.com>
Thu, 23 Sep 2021 17:00:37 +0000 (10:00 -0700)
also updates the instuctions how to reproduce a failur case.

ICU-21751 Review comments worked in.

.github/workflows/icu_ci.yml
docs/processes/release/tasks/integration.md

index 98e111c82d98af68a2f549f2d60591015215f581..e9690d934f986333ea806e50eae4a3bc426acfb2 100644 (file)
@@ -289,13 +289,35 @@ jobs:
           make -j2 check;
           rm lib/libicudata.so*;
           cp -P stubdata/libicudata.so* lib;
+
           cd test/cintltst;
           echo 'Running ICU4C cintltst with stubdata.';
           # Note: 'Elapsed Time: ' is printed by makefile upon final success.
-          CINTLTST_OPTS=-w make check 2>&1 | grep 'Elapsed Time: ';
+          CINTLTST_OPTS=-w make check 2>&1 | tee stubdata_ctest.log;
+          if ! grep 'Elapsed Time: ' stubdata_ctest.log
+          then
+            echo
+            echo cintltst run with stubdata failed
+            echo
+            echo See
+            echo https://unicode-org.github.io/icu/processes/release/tasks/integration.html#run-tests-without-icu-data
+            echo for how to reproduce and debug the failure
+            exit 1
+          fi
+
           cd ../intltest;
           echo 'Running ICU4C intltest with stubdata.';
-          INTLTEST_OPTS=-w make check 2>&1 | grep 'Elapsed Time: '
+          INTLTEST_OPTS=-w make check 2>&1 | tee stubdata_intltest.log;
+          if ! grep 'Elapsed Time: ' stubdata_intltest.log
+          then
+            echo
+            echo intltest run with stubdata failed
+            echo
+            echo See
+            echo https://unicode-org.github.io/icu/processes/release/tasks/integration.html#run-tests-without-icu-data
+            echo for how to reproduce and debug the failure
+            exit 1
+          fi
 
   # Test U_CHARSET_IS_UTF8
   u-charset-is-utf8-test:
index d2de0462b984589ddf13a084736601d051ea4ae3..98987c0aadc558d693ebe93026d33687fad4c659 100644 (file)
@@ -143,17 +143,30 @@ should be investigated and fixed.
 To do this, build and test normally, then replace the ICU data shared library
 with the stubdata library and run the tests again with the -w option.
 
-On Linux (adjust the version number, 60.1 in this example, as required)
+Using an in-source build on Linux:
 
 ```sh
 cd icu4c/source
-cp stubdata/libicudata.so.60.1 lib/
+./runConfigureICU Linux
+make -j2 check
+rm lib/libicudata.so*
+cp -P stubdata/libicudata.so* lib/
 cd test/intltest
 INTLTEST_OPTS=-w make check
 cd ../cintltst
 CINTLTST_OPTS=-w make check
 ```
 
+For debugging (for example using gdb) you cannot use `make check`. You need
+to set the `LD_LIBRARY_PATH` for the lib folder and then run
+`./cintltst -w` or `./intltest -w` etc. in the debugger.
+Example (in-source build on Linux):
+```sh
+cd test/cintltst
+export LD_LIBRARY_PATH=../../lib:../../tools/ctestfw
+./cintltst -w
+```
+
 ### ICU4J
 
 ICU4J has the test target for this, but does not work as designed for now. For