Guest User

Untitled

a guest
Oct 17th, 2017
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.68 KB | None | 0 0
  1. if test $IGNORE_FLAKY_TESTS = "true"
  2. then
  3. FLAKY_TESTS_MODE=dontcare
  4. else
  5. FLAKY_TESTS_MODE=run
  6. fi
  7.  
  8. echo FLAKY_TESTS_MODE=$FLAKY_TESTS_MODE
  9.  
  10. # individual steps that match "make run-ci" used in regular runs with
  11. # the additon of the --openssl-fips option
  12. # and validattion that we built in FIPS capable mode
  13.  
  14. # build in FIPS capabale mode, specifying the directory that we installed
  15. # the fipscanister files into in the earlier fipscanister build step
  16. export MAKE=make
  17. PYTHON=python ./configure --openssl-fips=$WORKSPACE/fipscanisterdir
  18. PYTHON=python FLAKY_TESTS=$FLAKY_TESTS_MODE $MAKE -j $(getconf _NPROCESSORS_ONLN)
  19.  
  20. # validate using process.versions output that we actually built in FIPS capable
  21. # mode. We expect to see "-fips" in the openssl version. For example:
  22. # "openssl: '1.0.2d-fips"
  23. export OPENSSL_VERSION="`out/Release/node -pe process.versions |grep openssl`"
  24. echo "Openssl Version: $OPENSSL_VERSION"
  25. export FIPS_CAPABLE="`echo "$OPENSSL_VERSION" |grep fips`"
  26. if [ X"$FIPS_CAPABLE" = X"" ]; then
  27. echo "Not built as FIPS capable, exiting"
  28. exit -1
  29. fi
  30.  
  31. NODE_VERSION=`out/Release/node --version |awk -F "." '{print $1}' | sed 's/v//g'`
  32.  
  33. # 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)
  34. NODE_TEST_DIR=${HOME}/node-tmp PYTHON=python FLAKY_TESTS=$FLAKY_TESTS_MODE $MAKE test-ci -j $(getconf _NPROCESSORS_ONLN)
  35. mv test.tap test-fips-base.tap
  36.  
  37. # now run the tests with fips on if we are a version later than 5.X
  38. if [ "$NODE_VERSION" -gt "5" ]; then
  39. 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)
  40. mv test.tap test-fips-on.tap
  41. fi
Add Comment
Please, Sign In to add comment