From: gnrunge Date: Wed, 22 Sep 2021 22:36:03 +0000 (-0700) Subject: ICU-21751 Improves failure reporting of the run-with-stubdata CI target and X-Git-Tag: release-70-rc~11 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=4af7d969dfe4a79587ff97efd7e7ea01aa0dcea6;p=icu ICU-21751 Improves failure reporting of the run-with-stubdata CI target and also updates the instuctions how to reproduce a failur case. ICU-21751 Review comments worked in. --- diff --git a/.github/workflows/icu_ci.yml b/.github/workflows/icu_ci.yml index 98e111c82d9..e9690d934f9 100644 --- a/.github/workflows/icu_ci.yml +++ b/.github/workflows/icu_ci.yml @@ -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: diff --git a/docs/processes/release/tasks/integration.md b/docs/processes/release/tasks/integration.md index d2de0462b98..98987c0aadc 100644 --- a/docs/processes/release/tasks/integration.md +++ b/docs/processes/release/tasks/integration.md @@ -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