tidy up ci and test scripts

v0.27.3
clanmills 5 years ago
parent 599c127b94
commit c69c6d0848

@ -6,7 +6,6 @@ set -x
source conan/bin/activate source conan/bin/activate
if [[ "$(uname -s)" == 'Linux' ]]; then if [[ "$(uname -s)" == 'Linux' ]]; then
if [ "$CC" == "clang" ]; then if [ "$CC" == "clang" ]; then
# clang + Ubuntu don't like to run with UBSAN, but ASAN works # clang + Ubuntu don't like to run with UBSAN, but ASAN works
export CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_CXX_FLAGS=\"-fsanitize=address\" -DCMAKE_C_FLAGS=\"-fsanitize=address\" -DCMAKE_EXE_LINKER_FLAGS=\"-fsanitize=address\" -DCMAKE_MODULE_LINKER_FLAGS=\"-fsanitize=address\"" export CMAKE_OPTIONS="$CMAKE_OPTIONS -DCMAKE_CXX_FLAGS=\"-fsanitize=address\" -DCMAKE_C_FLAGS=\"-fsanitize=address\" -DCMAKE_EXE_LINKER_FLAGS=\"-fsanitize=address\" -DCMAKE_MODULE_LINKER_FLAGS=\"-fsanitize=address\""
@ -19,15 +18,13 @@ else
export CMAKE_OPTIONS="$CMAKE_OPTIONS -DEXIV2_TEAM_USE_SANITIZERS=ON" export CMAKE_OPTIONS="$CMAKE_OPTIONS -DEXIV2_TEAM_USE_SANITIZERS=ON"
fi fi
mkdir build
mkdir build && cd build cd build
conan install .. -o webready=True --build missing conan install .. -o webready=True --build missing
cmake ${CMAKE_OPTIONS} -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=install .. cmake ${CMAKE_OPTIONS} -DEXIV2_TEAM_WARNINGS_AS_ERRORS=ON -DCMAKE_INSTALL_PREFIX=install ..
make -j2 make
make tests
make tests make install
make install
# Check for detecting issues with the installation of headers # Check for detecting issues with the installation of headers
if [ `ls install/include/exiv2/ | wc -l` > 10 ]; then if [ `ls install/include/exiv2/ | wc -l` > 10 ]; then
@ -37,11 +34,6 @@ else
exit 1 exit 1
fi fi
pushd .
cd bin
$EXIV2_VALGRIND ./unit_tests
popd
if [ -n "$COVERAGE" ]; then if [ -n "$COVERAGE" ]; then
bash <(curl -s https://codecov.io/bash) bash <(curl -s https://codecov.io/bash)
fi fi

@ -495,7 +495,7 @@ prepareTest()
good="$here/data/${this}.out" good="$here/data/${this}.out"
results="$here/tmp/${this}.out" results="$here/tmp/${this}.out"
tmpfile=$here/tmp/$this tmpfile=$here/tmp/$this
touch $tmpfile echo '' >> $tmpfile
if [ "$PLATFORM" == SunOS -o "$PLATFORM" == FreeBSD -o "$PLATFORM" == NetBSD ] ; then if [ "$PLATFORM" == SunOS -o "$PLATFORM" == FreeBSD -o "$PLATFORM" == NetBSD ] ; then
da1="" da1=""
@ -508,7 +508,7 @@ prepareTest()
fi fi
tmpfile=tmp/ttt tmpfile=tmp/ttt
touch $tmpfile echo '' >> $tmpfile
da1="--strip-trailing-cr" da1="--strip-trailing-cr"
diff -q $da1 $tmpfile $tmpfile 2>/dev/null diff -q $da1 $tmpfile $tmpfile 2>/dev/null
if [ $? -ne 0 ] ; then if [ $? -ne 0 ] ; then

Loading…
Cancel
Save