From 574097bd6f4ca39a8362c8dd42732c1cc9d6772e Mon Sep 17 00:00:00 2001 From: Jeffrey Walton Date: Fri, 29 Jun 2018 17:04:22 -0400 Subject: [PATCH] Add cryptest-autotools.sh --- TestScripts/cryptest-autotools.sh | 47 +++++++++++++++++++++++++++++++ 1 file changed, 47 insertions(+) create mode 100755 TestScripts/cryptest-autotools.sh diff --git a/TestScripts/cryptest-autotools.sh b/TestScripts/cryptest-autotools.sh new file mode 100755 index 00000000..b9ffdf8c --- /dev/null +++ b/TestScripts/cryptest-autotools.sh @@ -0,0 +1,47 @@ +#!/usr/bin/env bash + +# Feth the three required files +if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/Makefile.am -O Makefile.am; then + echo "Makefile.am download failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/configure.ac -O configure.ac; then + echo "configure.ac download failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! wget --no-check-certificate https://raw.githubusercontent.com/noloader/cryptopp-autotools/master/libcryptopp.pc.in -O libcryptopp.pc.in; then + echo "libcryptopp.pc.in download failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! autoreconf --force --install --warnings=all; then + echo "autoreconf failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! ./configure; then + echo "configure failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! make -j2 -f Makefile; then + echo "make failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! ./cryptestcwd v; then + echo "cryptestcwd v failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +if ! ./cryptestcwd tv all; then + echo "cryptestcwd v failed" + [[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 1 || return 1 +fi + +# Return success +[[ "$0" = "${BASH_SOURCE[0]}" ]] && exit 0 || return 0 + +