diff options
author | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-11-10 00:33:43 +0530 |
---|---|---|
committer | Naresh Kamboju <naresh.kamboju@linaro.org> | 2016-11-10 01:01:29 +0530 |
commit | b0ad7aa930355325c30a29857416e6a222ae2321 (patch) | |
tree | 1dc0ed47e4630cd9619749d502619636dd3eca9b /manual | |
parent | eeb48e3df41a9b13204a3886eea2d1d709629bb8 (diff) | |
download | test-definitions-pipe-b0ad7aa930355325c30a29857416e6a222ae2321.tar.gz |
manual: added manual openssl functional tests
Change-Id: I2325bacdc1cbb48e2c9131b069ce97a91553a3c9
Signed-off-by: Naresh Kamboju <naresh.kamboju@linaro.org>
Diffstat (limited to 'manual')
-rwxr-xr-x | manual/generic/linux/openssl-centos.sh | 66 | ||||
-rw-r--r-- | manual/generic/linux/openssl-centos.yaml | 39 |
2 files changed, 105 insertions, 0 deletions
diff --git a/manual/generic/linux/openssl-centos.sh b/manual/generic/linux/openssl-centos.sh new file mode 100755 index 0000000..b7d4de7 --- /dev/null +++ b/manual/generic/linux/openssl-centos.sh @@ -0,0 +1,66 @@ +#!/bin/sh + +# you should NOT be root +# run following steps on CentOS as user +sudo yum -y update +# build dependencies +sudo yum -y install autoconf automake binutils bison flex gcc gcc-c++ gettext \ + libtool sed make patch pkgconfig redhat-rpm-config rpm-build \ + diffutils coreutils glibc-static + +# sslverify=0 to be enabled in all repo files +# to work with yumdownloader --source +REPO_FILES="/etc/yum.repos.d/" +# shellcheck disable=SC2044 +for FILE in $(find "${REPO_FILES}"); do + sudo sed -i -e 's/sslverify=1/sslverify=0/g' "${FILE}" +done +sudo yum -y clean all + +# install openssl dependencies +sudo yum -y install perl openssl-devel krb5-devel zlib-devel + +mkdir -p "${HOME}"/rpmbuild/BUILD +mkdir -p "${HOME}"/rpmbuild/RPMS +mkdir -p "${HOME}"/rpmbuild/SOURCES +mkdir -p "${HOME}"/rpmbuild/SPECS +mkdir -p "${HOME}"/rpmbuild/SRPMS + +echo "%_topdir %(echo $HOME)/rpmbuild" > ~/.rpmmacros + +# shellcheck disable=SC2164 +cd "${HOME}" +# build and install lksctp-tools +sudo yumdownloader --source lksctp-tools + +# get version and release of lksctp-tools +SCTP_VERSION=$(sudo yum info lksctp-tools | grep Version | head -1| awk '{print $3}') +SCTP_RELEASE=$(sudo yum info lksctp-tools | grep Release | head -1| awk '{print $3}') + +rpmbuild --recompile lksctp-tools-"${SCTP_VERSION}""-""${SCTP_RELEASE}".src.rpm +# shellcheck disable=SC2164 +cd "${HOME}""/rpmbuild/BUILD/lksctp-tools-""${SCTP_VERSION}"/ +sudo make install + +# shellcheck disable=SC2164 +cd "${HOME}" +sudo yumdownloader --source openssl + +# get version and release of openssl +SSL_VERSION=$(sudo yum info openssl | grep Version | awk '{print $3}') +SSL_RELEASE=$(sudo yum info openssl | grep Release | awk '{print $3}') +# run below step, you could see list of dependencies not met and exit +rpmbuild --rebuild openssl-"${SSL_VERSION}""-""${SSL_RELEASE}".src.rpm + +# shellcheck disable=SC2164 +cd "${HOME}"/rpmbuild/SPECS/ + +sed -i -e 's/BuildRequires: lksctp-tools-devel/# BuildRequires: lksctp-tools-devel/g' openssl.spec +# build will start from this command +rpmbuild -ba openssl.spec + +# shellcheck disable=SC2164 +cd "${HOME}""/rpmbuild/BUILD/openssl-""${SSL_VERSION}"/ +make +sudo make install +make tests diff --git a/manual/generic/linux/openssl-centos.yaml b/manual/generic/linux/openssl-centos.yaml new file mode 100644 index 0000000..f73ed7b --- /dev/null +++ b/manual/generic/linux/openssl-centos.yaml @@ -0,0 +1,39 @@ +metadata: + name: openssl-centos + format: "Manual Test Definition 1.0" + description: "OpenSSL is an open source project that provides a robust, + commercial-grade, and full-featured toolkit for the Transport Layer + Security (TLS) and Secure Sockets Layer (SSL) protocols. + It is also a general-purpose cryptography library + ref: https://www.openssl.org" + maintainer: + - naresh.kamboju@linaro.org + os: + - centos + - fedora + scope: + - functional + devices: + - d02 + - d03 + - d05 + - overdrive + environment: + - manual-test + +run: + steps: + - login as root and edit sudoers file + - setup wheel group users without a password + - uncomment this line "%wheel ALL=(ALL) NOPASSWD: ALL" + - sudoedit /etc/sudoers + - save and exit + - logout and login as normal user ex: linaro + - ensure linaro user exit and belong to wheel group + - run openssl-centos.sh + - ./openssl-centos.sh + - run takes around 10 minutes + + expected: + - all tests should pass + - if any openssl test fails please report bugs |