From 29a4b38cb2c14fef0da0390e2b95824bc2431849 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pekka=20J=C3=A4=C3=A4skel=C3=A4inen?= Date: Tue, 15 Nov 2022 13:39:06 +0200 Subject: [PATCH] Fix test script issues Ignore a couple of harmless warnings from CXXTEST harness. Yet another workaround for https://github.com/cpc/openasip/issues/91: ensure the build-tree libopenasip.so is first in LD_LIBRARY_PATH when running unit tests through compiletest.sh. --- openasip/test/Makefile_test.defs | 1 + openasip/tools/scripts/compiletest.sh | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/openasip/test/Makefile_test.defs b/openasip/test/Makefile_test.defs index ce14e0d0b..9536ccda0 100644 --- a/openasip/test/Makefile_test.defs +++ b/openasip/test/Makefile_test.defs @@ -116,6 +116,7 @@ all: ${GCOV_TEST} ${INITIALIZATION} ${TESTS} ${GCOV_TEST2} ${FINALIZATION} %-runner.o: %-runner.cpp ${CXX} ${TCE_INCLUDES} ${CPPFLAGS} ${CXXFLAGS} \ + -Wno-sign-compare -Wno-ignored-qualifiers -Wno-catch-value \ ${EDITLINE_INCLUDES} ${BOOST_INCLUDES} -I ${CXXDIR} -I ${CXXDIR}/.. \ ${EXTRA_COMPILER_FLAGS} \ -g -c $< -o $@ diff --git a/openasip/tools/scripts/compiletest.sh b/openasip/tools/scripts/compiletest.sh index a77b0f66b..84faee356 100755 --- a/openasip/tools/scripts/compiletest.sh +++ b/openasip/tools/scripts/compiletest.sh @@ -322,6 +322,10 @@ MAKE_OPT="-k" export TCE_DEVEL_MODE=1 export PATH="$PATH:/bin:/usr/local/bin:/usr/bin" +# Yet another workaround for https://github.com/cpc/openasip/issues/91 +# Ensure we are testing the build tree openasip.so. +export LD_LIBRARY_PATH=$PWD/src/.libs:$LD_LIBRARY_PATH + USER=`whoami` if [ "$USER" == "root" ]; then