Skip to content
Snippets Groups Projects
Commit 3989c0938676 authored by Nick Wellnhofer's avatar Nick Wellnhofer
Browse files

Fix fuzzer test with VPATH build

Also fixes make distcheck.
parent 53f0366e1498
Branches
Tags
No related merge requests found
Showing
with 23 additions and 13 deletions
...@@ -2,5 +2,5 @@ ...@@ -2,5 +2,5 @@
EXTRA_PROGRAMS = genSeed html regexp schema uri xml xpath EXTRA_PROGRAMS = genSeed html regexp schema uri xml xpath
check_PROGRAMS = testFuzzer check_PROGRAMS = testFuzzer
EXTRA_DIST = html.dict regexp.dict schema.dict xml.dict xpath.dict \ EXTRA_DIST = html.dict regexp.dict schema.dict xml.dict xpath.dict \
seed/uri seed/regexp fuzz.h static_seed/uri static_seed/regexp fuzz.h
CLEANFILES = $(EXTRA_PROGRAMS) CLEANFILES = $(EXTRA_PROGRAMS)
...@@ -6,5 +6,5 @@ ...@@ -6,5 +6,5 @@
CLEANFILES = $(EXTRA_PROGRAMS) CLEANFILES = $(EXTRA_PROGRAMS)
AM_CPPFLAGS = -I$(top_srcdir)/include AM_CPPFLAGS = -I$(top_srcdir)/include -I$(top_builddir)/include
DEPENDENCIES = $(top_builddir)/libxml2.la DEPENDENCIES = $(top_builddir)/libxml2.la
LDADD = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD) LDADD = $(STATIC_BINARIES) $(top_builddir)/libxml2.la $(THREAD_LIBS) $(Z_LIBS) $(LZMA_LIBS) $(ICONV_LIBS) $(M_LIBS) $(WIN32_EXTRA_LIBADD)
...@@ -25,10 +25,11 @@ ...@@ -25,10 +25,11 @@
.PHONY: tests corpus clean-corpus .PHONY: tests corpus clean-corpus
corpus: seed/html.stamp seed/schema.stamp seed/xml.stamp seed/xpath.stamp corpus: seed/html.stamp seed/regexp.stamp seed/schema.stamp seed/uri.stamp \
seed/xml.stamp seed/xpath.stamp
tests: testFuzzer$(EXEEXT) corpus tests: testFuzzer$(EXEEXT) corpus
@echo "## Running fuzzer tests" @echo "## Running fuzzer tests"
@./testFuzzer$(EXEEXT) @./testFuzzer$(EXEEXT)
clean-corpus: clean-corpus:
...@@ -29,13 +30,12 @@ ...@@ -29,13 +30,12 @@
tests: testFuzzer$(EXEEXT) corpus tests: testFuzzer$(EXEEXT) corpus
@echo "## Running fuzzer tests" @echo "## Running fuzzer tests"
@./testFuzzer$(EXEEXT) @./testFuzzer$(EXEEXT)
clean-corpus: clean-corpus:
rm -rf seed/html.stamp seed/html rm -rf seed
rm -rf seed/schema.stamp seed/schema
rm -rf seed/xml.stamp seed/xml clean-local: clean-corpus
rm -rf seed/xpath.stamp seed/xpath
# Seed corpus # Seed corpus
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
seed/xml.stamp: genSeed$(EXEEXT) seed/xml.stamp: genSeed$(EXEEXT)
@mkdir -p seed/xml @mkdir -p seed/xml
@./genSeed$(EXEEXT) xml $(XML_SEED_CORPUS_SRC) ./genSeed$(EXEEXT) xml $(XML_SEED_CORPUS_SRC)
@touch seed/xml.stamp @touch seed/xml.stamp
xml_SOURCES = xml.c fuzz.c xml_SOURCES = xml.c fuzz.c
...@@ -63,7 +63,7 @@ ...@@ -63,7 +63,7 @@
seed/html.stamp: genSeed$(EXEEXT) seed/html.stamp: genSeed$(EXEEXT)
@mkdir -p seed/html @mkdir -p seed/html
@./genSeed$(EXEEXT) html '$(top_srcdir)/test/HTML/*' ./genSeed$(EXEEXT) html '$(top_srcdir)/test/HTML/*'
@touch seed/html.stamp @touch seed/html.stamp
html_SOURCES = html.c fuzz.c html_SOURCES = html.c fuzz.c
...@@ -79,6 +79,11 @@ ...@@ -79,6 +79,11 @@
# Regexp fuzzer # Regexp fuzzer
seed/regexp.stamp:
@mkdir -p seed/regexp
cp -r $(srcdir)/static_seed/regexp seed
@touch seed/regexp.stamp
regexp_SOURCES = regexp.c fuzz.c regexp_SOURCES = regexp.c fuzz.c
regexp_LDFLAGS = -fsanitize=fuzzer regexp_LDFLAGS = -fsanitize=fuzzer
...@@ -88,7 +93,7 @@ ...@@ -88,7 +93,7 @@
-dict=regexp.dict \ -dict=regexp.dict \
-max_len=200 \ -max_len=200 \
-timeout=5 \ -timeout=5 \
corpus/regexp $(srcdir)/seed/regexp corpus/regexp seed/regexp
# URI fuzzer # URI fuzzer
...@@ -92,6 +97,11 @@ ...@@ -92,6 +97,11 @@
# URI fuzzer # URI fuzzer
seed/uri.stamp:
@mkdir -p seed/uri
cp -r $(srcdir)/static_seed/uri seed
@touch seed/uri.stamp
uri_SOURCES = uri.c fuzz.c uri_SOURCES = uri.c fuzz.c
uri_LDFLAGS = -fsanitize=fuzzer uri_LDFLAGS = -fsanitize=fuzzer
...@@ -100,9 +110,9 @@ ...@@ -100,9 +110,9 @@
./uri$(EXEEXT) \ ./uri$(EXEEXT) \
-max_len=10000 \ -max_len=10000 \
-timeout=2 \ -timeout=2 \
corpus/uri $(srcdir)/seed/uri corpus/uri seed/uri
# XML Schema fuzzer # XML Schema fuzzer
seed/schema.stamp: genSeed$(EXEEXT) seed/schema.stamp: genSeed$(EXEEXT)
@mkdir -p seed/schema @mkdir -p seed/schema
...@@ -104,9 +114,9 @@ ...@@ -104,9 +114,9 @@
# XML Schema fuzzer # XML Schema fuzzer
seed/schema.stamp: genSeed$(EXEEXT) seed/schema.stamp: genSeed$(EXEEXT)
@mkdir -p seed/schema @mkdir -p seed/schema
@./genSeed$(EXEEXT) schema '$(top_srcdir)/test/schemas/*.xsd' ./genSeed$(EXEEXT) schema '$(top_srcdir)/test/schemas/*.xsd'
@touch seed/schema.stamp @touch seed/schema.stamp
schema_SOURCES = schema.c fuzz.c schema_SOURCES = schema.c fuzz.c
...@@ -124,7 +134,7 @@ ...@@ -124,7 +134,7 @@
seed/xpath.stamp: genSeed$(EXEEXT) seed/xpath.stamp: genSeed$(EXEEXT)
@mkdir -p seed/xpath @mkdir -p seed/xpath
@./genSeed$(EXEEXT) xpath "$(top_builddir)/test/XPath" ./genSeed$(EXEEXT) xpath '$(top_srcdir)/test/XPath'
@touch seed/xpath.stamp @touch seed/xpath.stamp
xpath_SOURCES = xpath.c fuzz.c xpath_SOURCES = xpath.c fuzz.c
......
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
File deleted
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment