blob: c722834559d390a374bb9a0be04b4305ff82531a [file] [log] [blame] [view]
Ebrahim Byagowi87f4aad2020-07-30 15:20:17 +04301## Build and Test
Roderick Sheeter00946ca2019-05-08 09:42:35 -07002
3```shell
Ebrahim Byagowi87f4aad2020-07-30 15:20:17 +04304meson build
5ninja -Cbuild
Ebrahim Byagowi20e42a22020-08-04 16:49:27 +04306meson test -Cbuild
Roderick Sheeter00946ca2019-05-08 09:42:35 -07007```
Ebrahim Byagowif1dd6052020-03-13 14:40:07 +03308
ebraminio99b8a842020-08-14 10:14:14 +04309### Debug with GDB
10
11```shell
12meson test -Cbuild --gdb testname
13```
14
15## Build and Run
16
17Depending on what area you are working in change or add `HB_DEBUG_<whatever>`.
18Values defined in `hb-debug.hh`.
19
20```shell
21CPPFLAGS='-DHB_DEBUG_SUBSET=100' meson setup build --reconfigure
22meson test -C build
23```
24
25### Run tests with asan
26
27```shell
28meson setup build -Db_sanitize=address --reconfigure
29meson compile -C build
30meson test -C build
31```
32
33### Enable Debug Logging
34
35```shell
36CPPFLAGS=-DHB_DEBUG_SUBSET=100 meson build --reconfigure
37ninja -C build
38```
39
rsheeter40631812019-05-08 09:47:34 -070040## Test with the Fuzzer
41
42```shell
ebraminiofcddf3b2020-08-14 10:19:33 +043043CXXFLAGS="-fsanitize=address,fuzzer-no-link" meson fuzzbuild --default-library=static -Dfuzzer_ldflags="-fsanitize=address,fuzzer" -Dexperimental_api=true
44ninja -Cfuzzbuild test/fuzzing/hb-{shape,draw,subset,set}-fuzzer
45fuzzbuild/test/fuzzing/hb-subset-fuzzer test/fuzzing/fonts
rsheeter40631812019-05-08 09:47:34 -070046```
Garret Riegercf414e32019-09-27 09:55:17 -070047
48## Profiling
49
50```
ebraminio99b8a842020-08-14 10:14:14 +043051meson build --reconfigure
Ebrahim Byagowi87f4aad2020-07-30 15:20:17 +043052meson compile -C build
53build/perf/perf
Garret Riegercf414e32019-09-27 09:55:17 -070054```
55