From 6d898321e405f1abb40e35919171601f5f4b656f Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Wed, 23 Nov 2016 15:17:46 -0500 Subject: [PATCH] Fix cryptest-symbols.sh to account for bench.cpp rename (Issue 337) --- TestScripts/cryptest-symbols.sh | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) diff --git a/TestScripts/cryptest-symbols.sh b/TestScripts/cryptest-symbols.sh index 5e0afea9..dac2b01b 100755 --- a/TestScripts/cryptest-symbols.sh +++ b/TestScripts/cryptest-symbols.sh @@ -208,7 +208,7 @@ fi "$MAKE" distclean &>/dev/null -rm -f GNUmakefile-symbols +rm -f GNUmakefile-symbols bench1.cpp bench.cpp git checkout master -f &>/dev/null cp GNUmakefile GNUmakefile-symbols @@ -234,6 +234,17 @@ else "$SED" "$SED_OPTS" -e 's|$(TESTOBJS) ./libcryptopp.a |$(TESTOBJS) ./libcryptopp.so |g' GNUmakefile-symbols fi +echo +echo "****************************************************************" +echo "Patching bench.cpp as needed" +echo "****************************************************************" +echo + +if [[ (-e bench.cpp) ]]; then + "$SED" "$SED_OPTS" -e 's|bench1.cpp|bench.cpp|g' GNUmakefile-symbols + "$SED" "$SED_OPTS" -e 's|bench1.o|bench.o|g' GNUmakefile-symbols +fi + echo echo "****************************************************************" echo "Building dynamic library for $OLD_VERSION_TAG" @@ -295,6 +306,18 @@ if [[ "$?" -ne "0" ]]; then [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 fi + +echo +echo "****************************************************************" +echo "Patching bench.cpp as needed" +echo "****************************************************************" +echo + +if [[ (-e bench1.cpp) ]]; then + "$SED" "$SED_OPTS" -e 's|bench.cpp|bench1.cpp|g' GNUmakefile-symbols + "$SED" "$SED_OPTS" -e 's|bench.o|bench1.o|g' GNUmakefile-symbols +fi + echo echo "****************************************************************" echo "Building dynamic library for $NEW_VERSION_TAG" @@ -329,4 +352,4 @@ if [[ "$?" -ne "0" ]]; then [[ "$0" = "$BASH_SOURCE" ]] && exit 1 || return 1 fi -[[ "$0" = "$BASH_SOURCE" ]] && exit 0 || return 0 +[[ "$0" = "$BASH_SOURCE" ]] && exit 0 || return 0 \ No newline at end of file