##// END OF EJS Templates
fuzz: try and ensure fuzzer tests run against the right python-config...
Augie Fackler -
r46883:b9184941 default
parent child Browse files
Show More
@@ -1,4 +1,4 b''
1 #require test-repo
1 #require test-repo py3
2
2
3 $ cd $TESTDIR/../contrib/fuzz
3 $ cd $TESTDIR/../contrib/fuzz
4 $ OUT=$TESTTMP ; export OUT
4 $ OUT=$TESTTMP ; export OUT
@@ -26,13 +26,23 b' up without a valid executable, so we don'
26 > -fsanitize=fuzzer-no-link,address || return 1
26 > -fsanitize=fuzzer-no-link,address || return 1
27 > }
27 > }
28
28
29 Try to find a python3-config that's next to our sys.executable. If
30 that doesn't work, fall back to looking for a global python3-config
31 and hope that works out for the best.
32 $ PYBIN=`$PYTHON -c 'import sys, os; print(os.path.dirname(sys.executable))'`
33 $ if [ -x "$PYBIN/python3-config" ] ; then
34 > PYTHON_CONFIG="$PYBIN/python3-config"
35 > else
36 > PYTHON_CONFIG="`which python3-config`"
37 > fi
38
29 #if clang-libfuzzer
39 #if clang-libfuzzer
30 $ CXX=clang++ havefuzz || exit 80
40 $ CXX=clang++ havefuzz || exit 80
31 $ $MAKE -s clean all PYTHON_CONFIG=`which python-config`
41 $ $MAKE -s clean all PYTHON_CONFIG="$PYTHON_CONFIG"
32 #endif
42 #endif
33 #if no-clang-libfuzzer clang-6.0
43 #if no-clang-libfuzzer clang-6.0
34 $ CXX=clang++-6.0 havefuzz || exit 80
44 $ CXX=clang++-6.0 havefuzz || exit 80
35 $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0 PYTHON_CONFIG=`which python-config`
45 $ $MAKE -s clean all CC=clang-6.0 CXX=clang++-6.0 PYTHON_CONFIG="$PYTHON_CONFIG"
36 #endif
46 #endif
37 #if no-clang-libfuzzer no-clang-6.0
47 #if no-clang-libfuzzer no-clang-6.0
38 $ exit 80
48 $ exit 80
General Comments 0
You need to be logged in to leave comments. Login now