aboutsummaryrefslogtreecommitdiffstats
path: root/tests/libfuzzer
diff options
context:
space:
mode:
authorRobert Loehning <robert.loehning@qt.io>2020-01-03 12:25:00 +0100
committerRobert Loehning <robert.loehning@qt.io>2020-01-03 18:05:53 +0100
commitc39765bfb9a5046259e7b585a5290ed799d42a24 (patch)
treee921476819948c115bef8dc59496ff555231f739 /tests/libfuzzer
parent024186e7d428bcd8823cf77bd51682669d73533d (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: I8d4db1bc459bd6d06feeb4351b75aa0cb07e0f85 Reviewed-by: Albert Astals Cid <albert.astals.cid@kdab.com>
Diffstat (limited to 'tests/libfuzzer')
-rw-r--r--tests/libfuzzer/qml/jsapi/evaluate/evaluate.pro7
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/libfuzzer/qml/jsapi/evaluate/evaluate.pro b/tests/libfuzzer/qml/jsapi/evaluate/evaluate.pro
index 301b4f606a..1b042c94d3 100644
--- a/tests/libfuzzer/qml/jsapi/evaluate/evaluate.pro
+++ b/tests/libfuzzer/qml/jsapi/evaluate/evaluate.pro
@@ -3,4 +3,9 @@ QT += qml
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
+}