Skip to content

Commit 667d95b

Browse files
committed
Fix build
Signed-off-by: Arthur Chan <[email protected]>
1 parent b04c280 commit 667d95b

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

projects/freeimage/build.sh

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,15 @@ $CXX $CXXFLAGS -I${INSTALL_DIR}/ -I${INSTALL_DIR}/Source $LIB_FUZZING_ENGINE \
3535
load_from_memory_fuzzer.cc ${INSTALL_DIR}/libfreeimage.a \
3636
-o $OUT/load_from_memory_fuzzer
3737

38-
# Build unit testing
38+
39+
# Build unit testing when it is not coverage or introspector build
3940
# Temporarily skipping testMemIO and testThumbnail because both of them throws ASAN crash of heap overflow
40-
cd $SRC/freeimage-svn/FreeImage/trunk/TestAPI
41-
sed -i 's#testMemIO#//testMemIO#g' MainTestSuite.cpp
42-
sed -i 's#testThumbnail#//testThumbnail#g' MainTestSuite.cpp
43-
$CXX $CXXFLAGS -I../Source MainTestSuite.cpp testChannels.cpp testHeaderOnly.cpp testImageType.cpp testJPEG.cpp \
44-
testMPage.cpp testMPageMemory.cpp testMPageStream.cpp testPlugins.cpp testTools.cpp testWrappedBuffer.cpp \
45-
../libfreeimage.a -fsanitize=$SANITIZER -o testAPI
41+
if [[ "$SANITIZER" != "introspector" && "$SANITIZER" != "coverage" ]]
42+
then
43+
cd $SRC/freeimage-svn/FreeImage/trunk/TestAPI
44+
sed -i 's#testMemIO#//testMemIO#g' MainTestSuite.cpp
45+
sed -i 's#testThumbnail#//testThumbnail#g' MainTestSuite.cpp
46+
$CXX $CXXFLAGS -I../Source MainTestSuite.cpp testChannels.cpp testHeaderOnly.cpp testImageType.cpp testJPEG.cpp \
47+
testMPage.cpp testMPageMemory.cpp testMPageStream.cpp testPlugins.cpp testTools.cpp testWrappedBuffer.cpp \
48+
../libfreeimage.a -fsanitize=$SANITIZER -o testAPI
49+
fi

0 commit comments

Comments
 (0)