diff --git a/TESTING.md b/TESTING.md index bc5f80d10..7e90e9d43 100644 --- a/TESTING.md +++ b/TESTING.md @@ -1,36 +1,3 @@ -## Build & Run - -Depending on what area you are working in change or add `HB_DEBUG_`. -Values defined in `hb-debug.hh`. - -```shell -CPPFLAGS='-DHB_DEBUG_SUBSET=100' meson setup build -meson test -C build -``` - -### Run tests with asan - -```shell -meson setup build -Db_sanitize=address -meson compile -C build -meson test -C build -``` - -### Debug with GDB - -``` -meson setup build -meson compile -C build -meson test -C build --gdb testname -``` - -### Enable Debug Logging - -```shell -CPPFLAGS=-DHB_DEBUG_SUBSET=100 meson build -ninja -C build -``` - ## Build and Test ```shell @@ -39,10 +6,41 @@ ninja -Cbuild meson test -Cbuild ``` +### Debug with GDB + +```shell +meson test -Cbuild --gdb testname +``` + +## Build and Run + +Depending on what area you are working in change or add `HB_DEBUG_`. +Values defined in `hb-debug.hh`. + +```shell +CPPFLAGS='-DHB_DEBUG_SUBSET=100' meson setup build --reconfigure +meson test -C build +``` + +### Run tests with asan + +```shell +meson setup build -Db_sanitize=address --reconfigure +meson compile -C build +meson test -C build +``` + +### Enable Debug Logging + +```shell +CPPFLAGS=-DHB_DEBUG_SUBSET=100 meson build --reconfigure +ninja -C build +``` + ## Test with the Fuzzer ```shell -CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson build --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer" -Dexperimental_api=true +CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson build --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer" -Dexperimental_api=true --reconfigure ninja -C build test/fuzzing/hb-{shape,draw,subset,set}-fuzzer build/test/fuzzing/hb-subset-fuzzer ``` @@ -50,7 +48,7 @@ build/test/fuzzing/hb-subset-fuzzer ## Profiling ``` -meson build +meson build --reconfigure meson compile -C build build/perf/perf ```