Skip to content

Commit 1ea07fc

Browse files
authored
xmldom: install @jazzer.js/core as part of build.sh (#13107)
it was [dropped from `devDependencies` in xmldom](xmldom/xmldom#845), since it can no longer be installed reliably on all machines.
1 parent 7de430f commit 1ea07fc

File tree

1 file changed

+12
-6
lines changed

1 file changed

+12
-6
lines changed

projects/xmldom/build.sh

Lines changed: 12 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,19 @@
1515
#
1616
################################################################################
1717

18-
# build project
18+
# install dependencies
1919
npm ci
20-
unzip node_modules/xmltest/xmltest.zip
20+
# no longer part of xmldom devDependencies since it can no longer be installed reliably
21+
npm i -D @jazzer.js/core
2122

22-
# Copy corpus out
23-
cp -rf $SRC/xmldom/xmltest $OUT/xmltest
23+
# prepare corpus
24+
XMLTEST_CORPUS=$OUT/xmldom/xmltest
25+
mkdir -p $XMLTEST_CORPUS
26+
# extract all *.xml files without a folder structure,
27+
# renaming duplicate filenames with ~, ~1, ~2, ...
28+
# into the target directory
29+
unzip -Bj node_modules/xmltest/xmltest.zip '*.xml' -d $XMLTEST_CORPUS
2430

2531
# build fuzzers
26-
compile_javascript_fuzzer xmldom fuzz/dom-parser.xml.target.js --sync --timeout=10 xmltest
27-
compile_javascript_fuzzer xmldom fuzz/dom-parser.html.target.js --sync --timeout=10 xmltest
32+
compile_javascript_fuzzer xmldom fuzz/dom-parser.xml.target.js --sync --timeout=10 $XMLTEST_CORPUS
33+
compile_javascript_fuzzer xmldom fuzz/dom-parser.html.target.js --sync --timeout=10 $XMLTEST_CORPUS

0 commit comments

Comments
 (0)