diff options
-rw-r--r-- | Makefile | 12 | ||||
-rw-r--r-- | automation/taskcluster/graph/src/extend.js | 16 | ||||
-rw-r--r-- | automation/taskcluster/graph/src/try_syntax.js | 7 | ||||
-rwxr-xr-x | automation/taskcluster/scripts/build_gyp.sh | 24 | ||||
-rwxr-xr-x | build.sh | 36 | ||||
-rw-r--r-- | external_tests/ssl_gtest/ssl_auth_unittest.cc | 2 | ||||
-rwxr-xr-x | tests/all.sh | 26 |
7 files changed, 92 insertions, 31 deletions
@@ -116,6 +116,7 @@ else NSPR_PREFIX = $$(topsrcdir)/../dist/$(OBJDIR_NAME) endif +ifndef NSS_GYP $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE) mkdir -p $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) cd $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) ; \ @@ -123,10 +124,21 @@ $(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE) $(NSPR_CONFIGURE_OPTS) \ --with-dist-prefix='$(NSPR_PREFIX)' \ --with-dist-includedir='$(NSPR_PREFIX)/include' +else +$(NSPR_CONFIG_STATUS): $(NSPR_CONFIGURE) + mkdir -p $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) + cd $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) ; \ + $(NSPR_CONFIGURE_ENV) sh ../configure \ + $(NSPR_CONFIGURE_OPTS) \ + --prefix='$(NSPR_PREFIX)' +endif build_nspr: $(NSPR_CONFIG_STATUS) $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) +install_nspr: build_nspr + $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) install + clobber_nspr: $(NSPR_CONFIG_STATUS) $(MAKE) -C $(CORE_DEPTH)/../nspr/$(OBJDIR_NAME) clobber diff --git a/automation/taskcluster/graph/src/extend.js b/automation/taskcluster/graph/src/extend.js index 6dbf2b8af..d61c2b2a0 100644 --- a/automation/taskcluster/graph/src/extend.js +++ b/automation/taskcluster/graph/src/extend.js @@ -98,6 +98,18 @@ export default async function main() { image: LINUX_IMAGE }); + await scheduleLinux("Linux 64 (debug, gyp)", { + command: [ + "/bin/bash", + "-c", + "bin/checkout.sh && nss/automation/taskcluster/scripts/build_gyp.sh" + ], + env: {USE_64: "1"}, + platform: "linux64", + collection: "gyp", + image: LINUX_IMAGE + }); + await scheduleLinux("Linux 64 (ASan, debug)", { env: { NSS_DISABLE_ARENA_FREE_LIST: "1", @@ -137,7 +149,7 @@ export default async function main() { async function scheduleLinux(name, base) { // Build base definition. - let build_base = merge(base, { + let build_base = merge({ command: [ "/bin/bash", "-c", @@ -152,7 +164,7 @@ async function scheduleLinux(name, base) { }, kind: "build", symbol: "B" - }); + }, base); // The task that builds NSPR+NSS. let task_build = queue.scheduleTask(merge(build_base, {name})); diff --git a/automation/taskcluster/graph/src/try_syntax.js b/automation/taskcluster/graph/src/try_syntax.js index 2f30207fd..3740d14b3 100644 --- a/automation/taskcluster/graph/src/try_syntax.js +++ b/automation/taskcluster/graph/src/try_syntax.js @@ -22,7 +22,7 @@ function parseOptions(opts) { } // Parse platforms. - let allPlatforms = ["linux", "linux64", "linux64-asan", "win64", "arm"]; + let allPlatforms = ["linux", "linux64", "linux64-asan", "win64", "arm", "linux64-gyp"]; let platforms = intersect(opts.platform.split(/\s*,\s*/), allPlatforms); // If the given value is nonsense or "none" default to all platforms. @@ -101,6 +101,7 @@ function filter(opts) { let aliases = { "linux": "linux32", "linux64-asan": "linux64", + "linux64-gyp": "linux64", "win64": "windows2012-64", "arm": "linux32" }; @@ -113,6 +114,8 @@ function filter(opts) { keep &= coll("asan"); } else if (platform == "arm") { keep &= coll("arm-opt") || coll("arm-debug"); + } else if (platform == "linux64-gyp") { + keep &= coll("gyp"); } else { keep &= coll("opt") || coll("debug"); } @@ -125,7 +128,7 @@ function filter(opts) { } // Finally, filter by build type. - let isDebug = coll("debug") || coll("asan") || coll("arm-debug"); + let isDebug = coll("debug") || coll("asan") || coll("arm-debug") || coll("gyp"); return (isDebug && opts.builds.includes("d")) || (!isDebug && opts.builds.includes("o")); } diff --git a/automation/taskcluster/scripts/build_gyp.sh b/automation/taskcluster/scripts/build_gyp.sh new file mode 100755 index 000000000..b2bd57a98 --- /dev/null +++ b/automation/taskcluster/scripts/build_gyp.sh @@ -0,0 +1,24 @@ +#!/usr/bin/env bash + +source $(dirname $0)/tools.sh + +if [[ $(id -u) -eq 0 ]]; then + # Set compiler. + switch_compilers + + # Drop privileges by re-running this script. + exec su worker $0 +fi + +# Clone NSPR if needed. +hg_clone https://hg.mozilla.org/projects/nspr nspr default + +# Build. +cd nss && NSS_GYP_GEN=1 ./build.sh +if [ $? != 0 ]; then + exit 1 +fi + +# Package. +cd .. && mkdir artifacts +tar cvfjh artifacts/dist.tar.bz2 dist diff --git a/build.sh b/build.sh new file mode 100755 index 000000000..c8e0a7cf7 --- /dev/null +++ b/build.sh @@ -0,0 +1,36 @@ +#!/bin/bash + +CWD="$PWD/$(dirname $0)" +OBJ_DIR="$(make platform)" +DIST_DIR="$CWD/../dist/$OBJ_DIR" + +# do NSPR things +NSS_GYP=1 make install_nspr + +if [ -z "${USE_64}" ]; then + GYP_PARAMS="-Dtarget_arch=ia32" +fi + +# generate NSS build files only if asked for it +if [ -n "${NSS_GYP_GEN}" -o ! -d out/Debug ]; then + PKG_CONFIG_PATH="$CWD/../nspr/$OBJ_DIR/config" gyp -f ninja $GYP_PARAMS --depth=. nss.gyp +fi +# build NSS +# TODO: only doing this for debug build for now +ninja -C out/Debug/ +if [ $? != 0 ]; then + exit 1 +fi + +# sign libs +# TODO: this is done every time at the moment. +cd out/Debug/ +LD_LIBRARY_PATH=$DIST_DIR/lib/ ./shlibsign -v -i lib/libfreebl3.so +LD_LIBRARY_PATH=$DIST_DIR/lib/ ./shlibsign -v -i lib/libfreeblpriv3.so +LD_LIBRARY_PATH=$DIST_DIR/lib/ ./shlibsign -v -i lib/libnssdbm3.so +LD_LIBRARY_PATH=$DIST_DIR/lib/ ./shlibsign -v -i lib/libsoftokn3.so + +# copy files over to the right directory +cp * "$DIST_DIR/bin/" +cp lib/* "$DIST_DIR/lib/" +find . -name "*.a" | xargs cp -t "$DIST_DIR/lib/" diff --git a/external_tests/ssl_gtest/ssl_auth_unittest.cc b/external_tests/ssl_gtest/ssl_auth_unittest.cc index 1dd5fc8c2..9bac85f5b 100644 --- a/external_tests/ssl_gtest/ssl_auth_unittest.cc +++ b/external_tests/ssl_gtest/ssl_auth_unittest.cc @@ -201,7 +201,7 @@ TEST_P(TlsConnectTls12, SignatureSchemeCurveMismatch12) { ssl_sig_ecdsa_secp384r1_sha384); } -#ifdef NSS_ENABLE_TLS_1_3 +#ifndef NSS_DISABLE_TLS_1_3 TEST_P(TlsConnectTls13, SignatureAlgorithmServerUnsupported) { Reset(TlsAgent::kServerEcdsa256); // P-256 cert server_->SetSignatureAlgorithms(SignatureEcdsaSha384, diff --git a/tests/all.sh b/tests/all.sh index 89922cf24..1b811f6f0 100755 --- a/tests/all.sh +++ b/tests/all.sh @@ -295,32 +295,6 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then fi # NOTE: -# Since in make at the top level, modutil is the last file -# created, we check for modutil to know whether the build -# is complete. If a new file is created after that, the -# following test for modutil should check for that instead. -# Exception: when building softoken only, shlibsign is the -# last file created. -if [ "${NSS_BUILD_SOFTOKEN_ONLY}" = "1" ]; then - LAST_FILE_BUILT=shlibsign -else - LAST_FILE_BUILT=modutil -fi - -if [ ! -f ${DIST}/${OBJDIR}/bin/${LAST_FILE_BUILT}${PROG_SUFFIX} ]; then - if [ "${NSS_BUILD_UTIL_ONLY}" = "1" ]; then - # Currently no tests are run or built when building util only. - # This may change in the future, atob and bota are - # possible candidates. - echo "No tests were built" - else - echo "Build Incomplete. Aborting test." >> ${LOGFILE} - html_head "Testing Initialization" - Exit "Checking for build" - fi -fi - -# NOTE: # Lists of enabled tests and other settings are stored to ${ENV_BACKUP} # file and are are restored after every test cycle. |