Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Bug 1330944 - GYP: Don't require Valgrind (ct_verif) for -Dtest_build…
…=1 r=mt

Differential Revision: https://nss-review.dev.mozaws.net/D149

--HG--
extra : amend_source : f272a956650b66b9caec9df65e82711290c9c49a
  • Loading branch information
Tim Taubert committed Jan 16, 2017
1 parent a0a101c commit 25acbeb
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 7 deletions.
3 changes: 0 additions & 3 deletions automation/taskcluster/docker-fuzz/setup.sh
Expand Up @@ -19,9 +19,6 @@ apt_packages+=('ninja-build')
apt_packages+=('pkg-config')
apt_packages+=('zlib1g-dev')

# ct-verif and sanitizers
apt_packages+=('valgrind')

# Latest Mercurial.
apt_packages+=('mercurial')
apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 41BD8711B1F0EC2B0D85B91CF59CE3A8323293EE
Expand Down
2 changes: 1 addition & 1 deletion automation/taskcluster/graph/src/extend.js
Expand Up @@ -368,7 +368,7 @@ async function scheduleTestBuilds() {
"/bin/bash",
"-c",
"bin/checkout.sh && " +
"nss/automation/taskcluster/scripts/build_gyp.sh -g -v --test"
"nss/automation/taskcluster/scripts/build_gyp.sh -g -v --test --ct-verif"
],
artifacts: {
public: {
Expand Down
2 changes: 2 additions & 0 deletions build.sh
Expand Up @@ -36,6 +36,7 @@ NSS build tool options:
--test ignore map files and export everything we have
--fuzz enable fuzzing mode. this always enables test builds
--pprof build with gperftool support
--ct-verif build with valgrind for ct-verif
--scan-build run the build with scan-build (scan-build has to be in the path)
--scan-build=/out/path sets the output path for scan-build
--asan do an asan build
Expand Down Expand Up @@ -103,6 +104,7 @@ while [ $# -gt 0 ]; do
--sancov) enable_sancov ;;
--sancov=?*) enable_sancov "${1#*=}" ;;
--pprof) gyp_params+=(-Duse_pprof=1) ;;
--ct-verif) gyp_params+=(-Dct_verif=1) ;;
*) show_help; exit 2 ;;
esac
shift
Expand Down
1 change: 1 addition & 0 deletions coreconf/config.gypi
Expand Up @@ -105,6 +105,7 @@
'fuzz%': 0,
'sign_libs%': 1,
'use_pprof%': 0,
'ct_verif%': 0,
'nss_public_dist_dir%': '<(nss_dist_dir)/public',
'nss_private_dist_dir%': '<(nss_dist_dir)/private',
},
Expand Down
8 changes: 6 additions & 2 deletions gtests/freebl_gtest/freebl_gtest.gyp
Expand Up @@ -19,8 +19,12 @@
'<(DEPTH)/lib/freebl/freebl.gyp:<(freebl_name)',
'<(DEPTH)/gtests/google_test/google_test.gyp:gtest',
],
'defines': [
'CT_VERIF',
'conditions': [
[ 'ct_verif==1', {
'defines': [
'CT_VERIF',
],
}],
],
}
],
Expand Down
2 changes: 2 additions & 0 deletions gtests/freebl_gtest/mpi_unittest.cc
Expand Up @@ -83,8 +83,10 @@ TEST_F(MPITest, MpiCmpConstTest) {
"FFFFFFFF00000000FFFFFFFFFFFFFFFFBCE6FAADA7179E84F3B9CAC2FC632550"),
16);

#ifdef CT_VERIF
mp_taint(&b);
mp_taint(&c);
#endif

uint32_t runs = 5000000;
uint32_t time_b = 0, time_c = 0;
Expand Down
2 changes: 1 addition & 1 deletion lib/freebl/freebl.gyp
Expand Up @@ -233,7 +233,7 @@
'UNSAFE_FUZZER_MODE',
],
}],
[ 'test_build==1', {
[ 'ct_verif==1', {
'defines': [
'CT_VERIF',
],
Expand Down

0 comments on commit 25acbeb

Please sign in to comment.