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:
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