Skip to content

Commit 7807a31

Browse files
authored
Add unit test build to OSS-Fuzz build.sh (#287)
1 parent e7aaccc commit 7807a31

1 file changed

Lines changed: 35 additions & 0 deletions

File tree

fuzzing/build.sh

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,3 +6,38 @@ cmake -S . -B build -DBUILD_FUZZER=ON && cmake --build build --target install
66
mkdir -p corpus
77
find $SRC/tomlplusplus -name "*.toml" -exec cp {} corpus \;
88
zip -q -j $OUT/toml_fuzzer_seed_corpus.zip corpus/*
9+
10+
# Build unit test
11+
clang++ -std=c++17 -O2 -DUSE_VENDORED_LIBS=1 \
12+
-Iinclude -Itests \
13+
tests/at_path.cpp \
14+
tests/conformance_burntsushi_invalid.cpp \
15+
tests/conformance_burntsushi_valid.cpp \
16+
tests/conformance_iarna_invalid.cpp \
17+
tests/conformance_iarna_valid.cpp \
18+
tests/formatters.cpp \
19+
tests/for_each.cpp \
20+
tests/impl_toml.cpp \
21+
tests/main.cpp \
22+
tests/manipulating_arrays.cpp \
23+
tests/manipulating_parse_result.cpp \
24+
tests/manipulating_tables.cpp \
25+
tests/manipulating_values.cpp \
26+
tests/parsing_arrays.cpp \
27+
tests/parsing_booleans.cpp \
28+
tests/parsing_comments.cpp \
29+
tests/parsing_dates_and_times.cpp \
30+
tests/parsing_floats.cpp \
31+
tests/parsing_integers.cpp \
32+
tests/parsing_key_value_pairs.cpp \
33+
tests/parsing_spec_example.cpp \
34+
tests/parsing_strings.cpp \
35+
tests/parsing_tables.cpp \
36+
tests/path.cpp \
37+
tests/tests.cpp \
38+
tests/user_feedback.cpp \
39+
tests/using_iterators.cpp \
40+
tests/visit.cpp \
41+
tests/windows_compat.cpp \
42+
-o unit_tests \
43+
-pthread

0 commit comments

Comments
 (0)