summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKai Engert <kaie@kuix.de>2019-09-19 15:17:37 +0200
committerKai Engert <kaie@kuix.de>2019-09-19 15:17:37 +0200
commitd7dba7b4aa5358ea4f602c474b6f24e62b7381fa (patch)
treea5e069e1ef688d3b7940163268d647234a6387cc
parent442c04e863efe54fc2962a746c9f178080b0553a (diff)
downloadnss-hg-d7dba7b4aa5358ea4f602c474b6f24e62b7381fa.tar.gz
Bug 1399095 - Allow nss-try to be used to test NSPR changes. r=kjacobs
-rw-r--r--automation/taskcluster/docker-gcc-4.4/Dockerfile1
-rw-r--r--automation/taskcluster/graph/src/try_syntax.js13
-rwxr-xr-xautomation/taskcluster/scripts/build.sh6
-rwxr-xr-xautomation/taskcluster/scripts/build_gyp.sh6
-rwxr-xr-xautomation/taskcluster/scripts/build_nspr.sh6
-rwxr-xr-xautomation/taskcluster/scripts/check_abi.sh6
-rwxr-xr-xautomation/taskcluster/scripts/gen_coverage_report.sh6
-rwxr-xr-xautomation/taskcluster/scripts/run_coverity.sh8
-rwxr-xr-xautomation/taskcluster/scripts/run_scan_build.sh6
-rw-r--r--automation/taskcluster/windows/build.sh6
-rw-r--r--automation/taskcluster/windows/build_gyp.sh6
11 files changed, 68 insertions, 2 deletions
diff --git a/automation/taskcluster/docker-gcc-4.4/Dockerfile b/automation/taskcluster/docker-gcc-4.4/Dockerfile
index 69538322a..55344e567 100644
--- a/automation/taskcluster/docker-gcc-4.4/Dockerfile
+++ b/automation/taskcluster/docker-gcc-4.4/Dockerfile
@@ -9,6 +9,7 @@ RUN apt-get update \
gcc-4.4 \
locales \
make \
+ patch \
mercurial \
zlib1g-dev \
&& rm -rf /var/lib/apt/lists/* \
diff --git a/automation/taskcluster/graph/src/try_syntax.js b/automation/taskcluster/graph/src/try_syntax.js
index 700032a31..ca0b84813 100644
--- a/automation/taskcluster/graph/src/try_syntax.js
+++ b/automation/taskcluster/graph/src/try_syntax.js
@@ -183,6 +183,17 @@ export async function initFilter() {
// Add try syntax filter.
if (match) {
- queue.filter(filter(parseOptions(match[1])));
+ let match1 = match[1];
+ queue.filter(filter(parseOptions(match1)));
+
+ if (match1.includes("--nspr-patch")) {
+ queue.map(task => {
+ if (!task.env) {
+ task.env = {};
+ }
+ task.env.ALLOW_NSPR_PATCH = "1";
+ return task;
+ });
+ }
}
}
diff --git a/automation/taskcluster/scripts/build.sh b/automation/taskcluster/scripts/build.sh
index 649fdaa1b..42ac822f2 100755
--- a/automation/taskcluster/scripts/build.sh
+++ b/automation/taskcluster/scripts/build.sh
@@ -13,6 +13,12 @@ fi
# Clone NSPR if needed.
hg_clone https://hg.mozilla.org/projects/nspr ./nspr default
+if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+fi
+
# Build.
make -C nss nss_build_all
diff --git a/automation/taskcluster/scripts/build_gyp.sh b/automation/taskcluster/scripts/build_gyp.sh
index d5a3fbdd9..e19a6362f 100755
--- a/automation/taskcluster/scripts/build_gyp.sh
+++ b/automation/taskcluster/scripts/build_gyp.sh
@@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh
# Clone NSPR if needed.
hg_clone https://hg.mozilla.org/projects/nspr ./nspr default
+if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+fi
+
# Build.
nss/build.sh -g -v --enable-libpkix "$@"
diff --git a/automation/taskcluster/scripts/build_nspr.sh b/automation/taskcluster/scripts/build_nspr.sh
index 4d1903460..b104e430a 100755
--- a/automation/taskcluster/scripts/build_nspr.sh
+++ b/automation/taskcluster/scripts/build_nspr.sh
@@ -7,6 +7,12 @@ source $(dirname $0)/tools.sh
# Clone NSPR if needed.
hg_clone https://hg.mozilla.org/projects/nspr nspr default
+if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+fi
+
# Build.
rm -rf dist
make -C nss build_nspr
diff --git a/automation/taskcluster/scripts/check_abi.sh b/automation/taskcluster/scripts/check_abi.sh
index caa5ccab2..5cd587a6b 100755
--- a/automation/taskcluster/scripts/check_abi.sh
+++ b/automation/taskcluster/scripts/check_abi.sh
@@ -20,6 +20,12 @@ set_env()
done
fi
+ if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+ fi
+
cd nss
./build.sh -v -c
cd ..
diff --git a/automation/taskcluster/scripts/gen_coverage_report.sh b/automation/taskcluster/scripts/gen_coverage_report.sh
index 3907c72e8..dc7d77d6c 100755
--- a/automation/taskcluster/scripts/gen_coverage_report.sh
+++ b/automation/taskcluster/scripts/gen_coverage_report.sh
@@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh
# Clone NSPR.
hg_clone https://hg.mozilla.org/projects/nspr ./nspr default
+if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+fi
+
out=/home/worker/artifacts
mkdir -p $out
diff --git a/automation/taskcluster/scripts/run_coverity.sh b/automation/taskcluster/scripts/run_coverity.sh
index 4d008f486..4b09f5398 100755
--- a/automation/taskcluster/scripts/run_coverity.sh
+++ b/automation/taskcluster/scripts/run_coverity.sh
@@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh
# Clone NSPR if needed.
if [ ! -d "nspr" ]; then
hg_clone https://hg.mozilla.org/projects/nspr ./nspr default
+
+ if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+ fi
fi
# Build and run Coverity
@@ -12,4 +18,4 @@ cd nss
./mach static-analysis
# Return the exit code of the Coverity Analysis
-exit $? \ No newline at end of file
+exit $?
diff --git a/automation/taskcluster/scripts/run_scan_build.sh b/automation/taskcluster/scripts/run_scan_build.sh
index 014530b42..0e4fcbdf0 100755
--- a/automation/taskcluster/scripts/run_scan_build.sh
+++ b/automation/taskcluster/scripts/run_scan_build.sh
@@ -5,6 +5,12 @@ source $(dirname "$0")/tools.sh
# Clone NSPR if needed.
if [ ! -d "nspr" ]; then
hg_clone https://hg.mozilla.org/projects/nspr ./nspr default
+
+ if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+ fi
fi
# Build.
diff --git a/automation/taskcluster/windows/build.sh b/automation/taskcluster/windows/build.sh
index eebb41535..f878a3d0d 100644
--- a/automation/taskcluster/windows/build.sh
+++ b/automation/taskcluster/windows/build.sh
@@ -12,6 +12,12 @@ source "$(dirname "$0")/setup.sh"
# Clone NSPR.
hg_clone https://hg.mozilla.org/projects/nspr nspr default
+if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+fi
+
# Build.
make -C nss nss_build_all
diff --git a/automation/taskcluster/windows/build_gyp.sh b/automation/taskcluster/windows/build_gyp.sh
index 94433ee45..1a78d44a7 100644
--- a/automation/taskcluster/windows/build_gyp.sh
+++ b/automation/taskcluster/windows/build_gyp.sh
@@ -31,6 +31,12 @@ export PATH="${PATH}:${PWD}/ninja/bin:${PWD}/gyp/test-env/Scripts"
# Clone NSPR.
hg_clone https://hg.mozilla.org/projects/nspr nspr default
+if [[ -f nss/nspr.patch && "$ALLOW_NSPR_PATCH" == "1" ]]; then
+ pushd nspr
+ cat ../nss/nspr.patch | patch -p1
+ popd
+fi
+
# Build with gyp.
./nss/build.sh -g -v --enable-libpkix "$@"