Skip to content

Commit

Permalink
Bug 1548179 - Remove --test (test_build) option from build.sh (replac…
Browse files Browse the repository at this point in the history
…ed by --static), remove Test builds from taskcluster since we exercise pk11_gtest and mpi_gtests in non-static builds already. r=mt,jcj

Differential Revision: https://phabricator.services.mozilla.com/D30998

--HG--
extra : moz-landing-system : lando
  • Loading branch information
Kevin Jacobs committed May 15, 2019
1 parent ad8fe0b commit ae3732e
Show file tree
Hide file tree
Showing 9 changed files with 13 additions and 95 deletions.
79 changes: 3 additions & 76 deletions automation/taskcluster/graph/src/extend.js
Expand Up @@ -103,15 +103,6 @@ queue.filter(task => {
return false;
}

if (task.group == "Test") {
// Don't run test builds on old make platforms, and not for fips gyp.
// Disable on aarch64, see bug 1488331.
if (task.collection == "make" || task.collection == "fips"
|| task.platform == "aarch64") {
return false;
}
}

// Don't run all additional hardware tests on ARM.
if (task.group == "Cipher" && task.platform == "aarch64" && task.env &&
(task.env.NSS_DISABLE_PCLMUL == "1" || task.env.NSS_DISABLE_HW_AES == "1"
Expand Down Expand Up @@ -528,8 +519,6 @@ async function scheduleLinux(name, overrides, args = "") {
symbol: "modular"
}));

await scheduleTestBuilds(name + " Test", merge(base, {group: "Test"}), args);

return queue.submit();
}

Expand Down Expand Up @@ -761,71 +750,6 @@ async function scheduleFuzzing32() {
return queue.submit();
}

/*****************************************************************************/

async function scheduleTestBuilds(name, base, args = "") {
// Build base definition.
let build = merge(base, {
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && " +
"nss/automation/taskcluster/scripts/build_gyp.sh -g -v --test --ct-verif " + args
],
artifacts: {
public: {
expires: 24 * 7,
type: "directory",
path: "/home/worker/artifacts"
}
},
kind: "build",
symbol: "B",
name: `${name} build`,
});

// On linux we have a specialized build image for building.
if (build.platform === "linux32" || build.platform === "linux64") {
build = merge(build, {
image: LINUX_BUILDS_IMAGE,
});
}

// The task that builds NSPR+NSS.
let task_build = queue.scheduleTask(build);

// Schedule tests.
queue.scheduleTask(merge(base, {
parent: task_build,
name: `${name} mpi tests`,
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/run_tests.sh"
],
tests: "mpi",
cycle: "standard",
symbol: "mpi",
kind: "test"
}));
queue.scheduleTask(merge(base, {
parent: task_build,
command: [
"/bin/bash",
"-c",
"bin/checkout.sh && nss/automation/taskcluster/scripts/run_tests.sh"
],
name: `${name} gtests`,
symbol: "Gtest",
tests: "gtests",
cycle: "standard",
kind: "test"
}));

return queue.submit();
}


/*****************************************************************************/

async function scheduleWindows(name, base, build_script) {
Expand Down Expand Up @@ -951,6 +875,9 @@ function scheduleTests(task_build, task_cert, test_base) {
queue.scheduleTask(merge(no_cert_base, {
name: "tlsfuzzer tests", symbol: "tlsfuzzer", tests: "tlsfuzzer", cycle: "standard"
}));
queue.scheduleTask(merge(no_cert_base, {
name: "MPI tests", symbol: "MPI", tests: "mpi", cycle: "standard"
}));
queue.scheduleTask(merge(cert_base, {
name: "Chains tests", symbol: "Chains", tests: "chains"
}));
Expand Down
1 change: 0 additions & 1 deletion build.sh
Expand Up @@ -94,7 +94,6 @@ while [ $# -gt 0 ]; do
--sancov=?*) enable_sancov "${1#*=}" ;;
--emit-llvm) gyp_params+=(-Demit_llvm=1 -Dsign_libs=0) ;;
--no-zdefs) gyp_params+=(-Dno_zdefs=1) ;;
--test) gyp_params+=(-Dtest_build=1 -Dstatic_libs=1) ;;
--static) gyp_params+=(-Dstatic_libs=1) ;;
--ct-verif) gyp_params+=(-Dct_verif=1) ;;
--nspr) nspr_clean; rebuild_nspr=1 ;;
Expand Down
2 changes: 0 additions & 2 deletions coreconf/config.gypi
Expand Up @@ -106,7 +106,6 @@
'moz_fold_libs%': 0,
'moz_folded_library_name%': '',
'sanitizer_flags%': 0,
'test_build%': 0,
'static_libs%': 0,
'no_zdefs%': 0,
'fuzz%': 0,
Expand All @@ -130,7 +129,6 @@
# This is mostly for linking to libraries.
'variables': {
'mapfile%': '',
'test_build%': 0,
'static_libs%': 0,
'debug_optimization_level%': '0',
'release_optimization_level%': '2',
Expand Down
2 changes: 1 addition & 1 deletion coreconf/fuzz.sh
Expand Up @@ -14,7 +14,7 @@ if [ -z "$CC" ]; then
export CXX=clang++
fi

gyp_params+=(-Dtest_build=1 -Dstatic_libs=1 -Dfuzz=1 -Dsign_libs=0)
gyp_params+=(-Dstatic_libs=1 -Dfuzz=1 -Dsign_libs=0)

# Add debug symbols even for opt builds.
nspr_params+=(--enable-debug-symbols)
Expand Down
2 changes: 1 addition & 1 deletion fuzz/fuzz.gyp
Expand Up @@ -91,7 +91,7 @@
'-lcrypto',
],
}],
# For test builds we have to set MPI defines.
# For static builds we have to set MPI defines.
[ 'target_arch=="ia32"', {
'defines': [
'MP_USE_UINT_DIGIT',
Expand Down
2 changes: 1 addition & 1 deletion gtests/freebl_gtest/freebl_gtest.gyp
Expand Up @@ -85,7 +85,7 @@
'defines': [
'NSS_USE_STATIC_LIBS',
],
# For test builds we have to set MPI defines.
# For static builds we have to set MPI defines.
'conditions': [
[ 'ct_verif==1', {
'defines': [
Expand Down
5 changes: 2 additions & 3 deletions help.txt
Expand Up @@ -3,7 +3,7 @@ Usage: build.sh [-h] [-c|-cc] [-v] [-j <n>] [--gyp|-g] [--opt|-o]
[--clang|--gcc|--msvc] [--scan-build[=dir]] [--disable-tests]
[--pprof] [--asan] [--msan] [--ubsan[=bool,shift,...]
[--fuzz[=tls|oss]] [--sancov[=edge|bb|func|...]]
[--emit-llvm] [--no-zdefs] [--test] [--ct-verif]
[--emit-llvm] [--no-zdefs] [--static] [--ct-verif]
[--nspr|--with-nspr=<include>:<lib>|--system-nspr]
[--system-sqlite] [--enable-fips] [--enable-libpkix]
[--mozpkix-only] [-D<gyp-option>]
Expand Down Expand Up @@ -31,15 +31,14 @@ NSS build tool options:
--msan enable memory sanitizer
--ubsan enable undefined behavior sanitizer
--ubsan=bool,shift,... sets specific UB sanitizers
--fuzz build fuzzing targets (this always enables test builds)
--fuzz build fuzzing targets (this always enables static builds)
--fuzz=tls to enable TLS fuzzing mode
--fuzz=oss to build for OSS-Fuzz
--sancov do sanitize coverage builds
--sancov=func sets coverage to function level for example
--emit-llvm emit LLVM bitcode while building
(requires the gold linker, use clang-3.8 for SAW)
--no-zdefs don't set -Wl,-z,defs
--test ignore map files and export everything we have
--static create static libraries and use static linking
--ct-verif build with valgrind for ct-verif
--nspr force a rebuild of NSPR
Expand Down
8 changes: 4 additions & 4 deletions lib/freebl/freebl.gyp
Expand Up @@ -126,9 +126,9 @@
'<(DEPTH)/exports.gyp:nss_exports'
]
},
# For test builds, build a static freebl library so we can statically
# link it into the test build binary. This way we don't have to
# dlopen() the shared lib but can directly call freebl functions.
# Build a static freebl library so we can statically link it into
# the binary. This way we don't have to dlopen() the shared lib
# but can directly call freebl functions.
{
'target_name': 'freebl_static',
'type': 'static_library',
Expand All @@ -154,7 +154,7 @@
],
'conditions': [
[ 'target_arch=="x64"', {
# The AES assembler code doesn't work in static test builds.
# The AES assembler code doesn't work in static builds.
# The linker complains about non-relocatable code, and I
# currently don't know how to fix this properly.
'sources!': [
Expand Down
7 changes: 1 addition & 6 deletions nss.gyp
Expand Up @@ -192,6 +192,7 @@
'cmd/tstclnt/tstclnt.gyp:tstclnt',
'cmd/vfychain/vfychain.gyp:vfychain',
'cmd/vfyserv/vfyserv.gyp:vfyserv',
'cmd/mpitests/mpitests.gyp:mpi_tests',
'gtests/certhigh_gtest/certhigh_gtest.gyp:certhigh_gtest',
'gtests/cryptohi_gtest/cryptohi_gtest.gyp:cryptohi_gtest',
'gtests/der_gtest/der_gtest.gyp:der_gtest',
Expand Down Expand Up @@ -223,12 +224,6 @@
'cmd/pkix-errcodes/pkix-errcodes.gyp:pkix-errcodes',
],
}],
[ 'test_build==1', {
'dependencies': [
'cmd/mpitests/mpitests.gyp:mpi_tests',
'gtests/freebl_gtest/freebl_gtest.gyp:freebl_gtest',
],
}],
[ 'disable_fips==0', {
'dependencies': [
'cmd/fipstest/fipstest.gyp:fipstest',
Expand Down

0 comments on commit ae3732e

Please sign in to comment.