Created
October 17, 2017 12:32
-
-
Save rvagg/38f951a4d41bc3f83137b8845e53f788 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if test $IGNORE_FLAKY_TESTS = "true" | |
then | |
FLAKY_TESTS_MODE=dontcare | |
else | |
FLAKY_TESTS_MODE=run | |
fi | |
echo FLAKY_TESTS_MODE=$FLAKY_TESTS_MODE | |
# individual steps that match "make run-ci" used in regular runs with | |
# the additon of the --openssl-fips option | |
# and validattion that we built in FIPS capable mode | |
# build in FIPS capabale mode, specifying the directory that we installed | |
# the fipscanister files into in the earlier fipscanister build step | |
export MAKE=make | |
PYTHON=python ./configure --openssl-fips=$WORKSPACE/fipscanisterdir | |
PYTHON=python FLAKY_TESTS=$FLAKY_TESTS_MODE $MAKE -j $(getconf _NPROCESSORS_ONLN) | |
# validate using process.versions output that we actually built in FIPS capable | |
# mode. We expect to see "-fips" in the openssl version. For example: | |
# "openssl: '1.0.2d-fips" | |
export OPENSSL_VERSION="`out/Release/node -pe process.versions |grep openssl`" | |
echo "Openssl Version: $OPENSSL_VERSION" | |
export FIPS_CAPABLE="`echo "$OPENSSL_VERSION" |grep fips`" | |
if [ X"$FIPS_CAPABLE" = X"" ]; then | |
echo "Not built as FIPS capable, exiting" | |
exit -1 | |
fi | |
NODE_VERSION=`out/Release/node --version |awk -F "." '{print $1}' | sed 's/v//g'` | |
# This either runs with FIPS on in 4.X or 5.X or with FIPS off in 6.X or later (as the default was changed) | |
NODE_TEST_DIR=${HOME}/node-tmp PYTHON=python FLAKY_TESTS=$FLAKY_TESTS_MODE $MAKE test-ci -j $(getconf _NPROCESSORS_ONLN) | |
mv test.tap test-fips-base.tap | |
# now run the tests with fips on if we are a version later than 5.X | |
if [ "$NODE_VERSION" -gt "5" ]; then | |
NODE_TEST_DIR=${HOME}/node-tmp PYTHON=python FLAKY_TESTS=$FLAKY_TESTS_MODE TEST_CI_ARGS="--node-args --enable-fips" $MAKE test-ci -j $(getconf _NPROCESSORS_ONLN) | |
mv test.tap test-fips-on.tap | |
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
if test $IGNORE_FLAKY_TESTS = "true" | |
then | |
FLAKY_TESTS_MODE=dontcare | |
else | |
FLAKY_TESTS_MODE=run | |
fi | |
echo FLAKY_TESTS_MODE=$FLAKY_TESTS_MODE | |
#echo ---------------------------------------------- | |
#env | |
#echo ---------------------------------------------- | |
if [[ "$nodes" =~ clang ]]; then | |
# ubuntu12 clang variant | |
export CC=clang | |
export CXX=clang++ | |
fi | |
# clang is only supported in Node versions 7 and lower | |
MAJOR_VERSION=`cat src/node_version.h |grep "#define NODE_MAJOR_VERSION" | awk '{ print $3}'` | |
RUN_TESTS="RUN" | |
echo $SMARTOS_VERSION | |
if [[ ${MAJOR_VERSION} -gt 7 && "$nodes" =~ 'ubuntu1204|fedora22|centos5' ]]; then | |
RUN_TESTS=DONT_RUN | |
SKIP_MESSAGE="$nodes is not supported for version 8 and above, skipping" | |
fi | |
if [ "$RUN_TESTS" = "RUN" ]; then | |
NODE_TEST_DIR=${HOME}/node-tmp PYTHON=python FLAKY_TESTS=$FLAKY_TESTS_MODE make run-ci -j $(getconf _NPROCESSORS_ONLN) | |
else | |
echo $SKIP_MESSAGE | |
# fake out so we don't get failures | |
echo "1..1" >${WORKSPACE}/test.tap | |
echo "ok 1 $SKIP_MESSAGE" >>${WORKSPACE}/test.tap | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment