diff options
author | 2020-02-26 01:19:13 +0100 | |
---|---|---|
committer | 2020-02-25 16:19:13 -0800 | |
commit | 19a990529fa7e04f71480060dc1497775b8a1832 (patch) | |
tree | e3e922d1bcff07272b0eadd803f43c477e6ead72 /projects | |
parent | 3a9c0784f0a81ba1be76a9c60a9ad4751034f222 (diff) |
[qt] Make using longer names for fuzz targets possible (#3426)
* [qt] Use longer names for fuzz targets
They give a better overview by resembling
the path of the tested code.
* [qt] Add missing "fi"
Diffstat (limited to 'projects')
-rwxr-xr-x | projects/qt/build.sh | 28 |
1 files changed, 17 insertions, 11 deletions
diff --git a/projects/qt/build.sh b/projects/qt/build.sh index 3e83f588..eeb3a9bf 100755 --- a/projects/qt/build.sh +++ b/projects/qt/build.sh @@ -37,12 +37,15 @@ zip -j $WORK/xml $SRC/qtqa/fuzzing/testcases/xml/* /usr/share/afl/testcases/othe # build fuzzers build_fuzzer() { - local module=$1 - local proFilePath=$2 - local format=${3-""} - local dictionary=${4-""} + local nameScheme=$1 + local module=$2 + local proFilePath=$3 + local format=${4-""} + local dictionary=${5-""} local proFileName=${proFilePath##*/} local exeName=${proFileName%%.*} + local proFileDir=${proFilePath%/*} + local targetName="$module"_${proFileDir//\//_} mkdir build_fuzzer cd build_fuzzer $WORK/qtbase/bin/qmake $SRC/qt/$module/tests/libfuzzer/$proFilePath @@ -58,19 +61,22 @@ build_fuzzer() { if [ "$lowercaseExeName" != "$exeName" ]; then mv $lowercaseExeName $exeName fi + if [ "$nameScheme" == "old" ]; then + targetName="$exeName" + fi - mv $exeName $OUT + mv $exeName $OUT/$targetName if [ -n "$format" ]; then - cp $WORK/$format.zip $OUT/"$exeName"_seed_corpus.zip + cp $WORK/$format.zip $OUT/"$targetName"_seed_corpus.zip fi if [ -n "$dictionary" ]; then - cp $dictionary $OUT/$exeName.dict + cp $dictionary $OUT/$targetName.dict fi cd .. rm -r build_fuzzer } -build_fuzzer "qtbase" "corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro" "xml" "/usr/share/afl/testcases/_extras/xml.dict" -# build_fuzzer "qtbase" "gui/text/qtextdocument/sethtml/sethtml.pro" "html" "/usr/share/afl/testcases/_extras/html_tags.dict" -build_fuzzer "qtbase" "gui/text/qtextdocument/setmarkdown/setmarkdown.pro" "markdown" -build_fuzzer "qtbase" "gui/text/qtextlayout/beginlayout/beginlayout.pro" +build_fuzzer "old" "qtbase" "corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro" "xml" "/usr/share/afl/testcases/_extras/xml.dict" +# build_fuzzer "new" "qtbase" "gui/text/qtextdocument/sethtml/sethtml.pro" "html" "/usr/share/afl/testcases/_extras/html_tags.dict" +build_fuzzer "old" "qtbase" "gui/text/qtextdocument/setmarkdown/setmarkdown.pro" "markdown" +build_fuzzer "old" "qtbase" "gui/text/qtextlayout/beginlayout/beginlayout.pro" |