summaryrefslogtreecommitdiffstats
path: root/tests/libfuzzer/corelib/serialization/qxmlstream
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-01-02 19:05:37 +0100
committerRobert Loehning <robert.loehning@qt.io>2020-01-03 18:05:08 +0100
commit1f87fb359fdff14e42662384a9c8a0bcb3837671 (patch)
treeb2d578dca0b41454c0c551c27ff737f4a94cdb84 /tests/libfuzzer/corelib/serialization/qxmlstream
parent71477104eb0be31452664e22927beb909465ffcd (diff)
Fuzzing: Allow linking to other fuzzing engines
oss-fuzz sets the environment variable LIB_FUZZING_ENGINE to link with AFL or libFuzzer. If this variable is not set, libFuzzer will be used as before, only that the right qmake variable will be used for doing so. Change-Id: If9fe7739a8d2d4a76f4633a75cad3d2e935f3b61 Reviewed-by: Shawn Rutledge <shawn.rutledge@qt.io> Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Diffstat (limited to 'tests/libfuzzer/corelib/serialization/qxmlstream')
-rw-r--r--tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
index 2fda3ecefd..6c988c2434 100644
--- a/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
+++ b/tests/libfuzzer/corelib/serialization/qxmlstream/qxmlstreamreader/readnext/readnext.pro
@@ -2,4 +2,9 @@ QT -= gui
CONFIG += console
CONFIG -= app_bundle
SOURCES += main.cpp
-LIBS += -fsanitize=fuzzer
+FUZZ_ENGINE = $$(LIB_FUZZING_ENGINE)
+isEmpty(FUZZ_ENGINE) {
+ QMAKE_LFLAGS += -fsanitize=fuzzer
+} else {
+ LIBS += $$FUZZ_ENGINE
+}