diff options
author | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-06-24 06:51:14 +0200 |
---|---|---|
committer | Nikos Mavrogiannopoulos <nmav@gnutls.org> | 2018-06-24 07:57:31 +0200 |
commit | e9bf3a2364e05de8dab0d6f8885c4bf72004b9df (patch) | |
tree | e1b10ee836a83ad5d2acd331ba38a81fb6cde024 | |
parent | d986f7042c798bd52e5dc46e0ba7ca9481a6532d (diff) | |
download | gnutls-e9bf3a2364e05de8dab0d6f8885c4bf72004b9df.tar.gz |
.gitlab-ci.yml: updated x86 CI builds with better datefudge detection
Signed-off-by: Nikos Mavrogiannopoulos <nmav@gnutls.org>
-rw-r--r-- | .gitlab-ci.yml | 5 | ||||
-rwxr-xr-x | tests/cert-tests/pkcs1-pad | 9 | ||||
-rw-r--r-- | tests/scripts/common.sh | 6 | ||||
-rwxr-xr-x | tests/suite/testcompat-openssl.sh | 8 | ||||
-rwxr-xr-x | tests/suite/testcompat-polarssl.sh | 8 | ||||
-rwxr-xr-x | tests/suite/testcompat-tls13-openssl.sh | 9 |
6 files changed, 18 insertions, 27 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1c875e420..a24104e1cc 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -403,17 +403,14 @@ FreeBSD.x86_64: - tests/*.log - tests/*/*.log -# We need a clean 32-bit fedora for testing. Note that this is also -# a test for interoperability with openssl 1.0.x. Fedora.x86: stage: stage1-testing image: $CI_REGISTRY/$BUILD_IMAGES_PROJECT:$FEDORA_X86_BUILD script: - - git submodule update --init --no-fetch - ./bootstrap && mkdir -p build && cd build && CC="ccache gcc -m32" PKG_CONFIG_LIBDIR=/usr/lib/pkgconfig/ ../configure --disable-gcc-warnings --host=i686-redhat-linux --target=i686-redhat-linux --libdir=/usr/lib --disable-cxx --disable-non-suiteb-curves --enable-seccomp-tests --disable-full-test-suite --disable-doc --disable-guile && - make -j$(nproc) && make check -j$(nproc) && + make -j$(nproc) && make check -j$(nproc) SKIP_DATEFUDGE_CHECK=1 && make pic-check tags: - shared diff --git a/tests/cert-tests/pkcs1-pad b/tests/cert-tests/pkcs1-pad index 7c0723ee64..a314fb308d 100755 --- a/tests/cert-tests/pkcs1-pad +++ b/tests/cert-tests/pkcs1-pad @@ -32,12 +32,9 @@ fi export TZ="UTC" -# Check for datefudge -TSTAMP=`datefudge "2006-09-23" date -u +%s || true` -if test "${TSTAMP}" != "1158969600"; then - echo "You need datefudge to run this test" - exit 77 -fi +. ${srcdir}/../scripts/common.sh + +check_for_datefudge TMPFILE1=pkcs1-pad.$$.tmp TMPFILE2=pkcs1-pad-2.$$.tmp diff --git a/tests/scripts/common.sh b/tests/scripts/common.sh index 8662d93cf1..35ac52e5a6 100644 --- a/tests/scripts/common.sh +++ b/tests/scripts/common.sh @@ -67,6 +67,12 @@ GETPORT='rc=0; myrandom=$(date +%N | sed s/^0*//) ' check_for_datefudge() { + # On certain platforms running datefudge date fails (e.g., x86 datefudge + # with x86-64 date app). + if test ${SKIP_DATEFUDGE_CHECK} = 1;then + return + fi + TSTAMP=`datefudge -s "2006-09-23" date -u +%s || true` if test "$TSTAMP" != "1158969600" || test "$WINDOWS" = 1; then echo $TSTAMP diff --git a/tests/suite/testcompat-openssl.sh b/tests/suite/testcompat-openssl.sh index 216047087d..bfc59c09ac 100755 --- a/tests/suite/testcompat-openssl.sh +++ b/tests/suite/testcompat-openssl.sh @@ -52,11 +52,9 @@ fi export TZ="UTC" # Check for datefudge -TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null` -if test "${TSTAMP}" != "1158969600"; then - echo "You need datefudge to run this test" - exit 77 -fi +. "${srcdir}/../scripts/common.sh" + +check_for_datefudge timeout 1800 datefudge "2012-09-2" "${srcdir}/testcompat-main-openssl" diff --git a/tests/suite/testcompat-polarssl.sh b/tests/suite/testcompat-polarssl.sh index 4c7a493d17..1af0099dca 100755 --- a/tests/suite/testcompat-polarssl.sh +++ b/tests/suite/testcompat-polarssl.sh @@ -40,11 +40,9 @@ if test "${GNUTLS_FORCE_FIPS_MODE}" = 1;then fi # Check for datefudge -TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null` -if test "${TSTAMP}" != "1158969600"; then - echo "You need datefudge to run this test" - exit 77 -fi +. "${srcdir}/../scripts/common.sh" + +check_for_datefudge cat /proc/cpuinfo|grep "model name"|grep "VIA Esther" >/dev/null 2>&1 if test $? = 0; then diff --git a/tests/suite/testcompat-tls13-openssl.sh b/tests/suite/testcompat-tls13-openssl.sh index 4058da8f6a..e7a58f560a 100755 --- a/tests/suite/testcompat-tls13-openssl.sh +++ b/tests/suite/testcompat-tls13-openssl.sh @@ -39,13 +39,6 @@ if ! test -x "${CLI}"; then exit 77 fi -# Check for datefudge -TSTAMP=`datefudge "2006-09-23 00:00 UTC" date -u +%s 2>/dev/null` -if test "${TSTAMP}" != "1158969600"; then - echo "You need datefudge to run this test" - exit 77 -fi - if ! test -z "${VALGRIND}"; then VALGRIND="${LIBTOOL:-libtool} --mode=execute ${VALGRIND}" fi @@ -56,6 +49,8 @@ fi . "${srcdir}/../scripts/common.sh" +check_for_datefudge + . "${srcdir}/testcompat-common" PORT="${PORT:-${RPORT}}" |