[docs] Reorder TESTING.md sections

And use --reconfigure where makes sense
This commit is contained in:
ebraminio 2020-08-14 10:14:14 +04:30 committed by GitHub
parent 1e48225ca3
commit 99b8a84cc5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 33 additions and 35 deletions

View File

@ -1,36 +1,3 @@
## Build & Run
Depending on what area you are working in change or add `HB_DEBUG_<whatever>`.
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_<whatever>`.
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
```