diff options
-rw-r--r-- | automation/taskcluster/graph/windows/_build_base.yml | 2 | ||||
-rwxr-xr-x | automation/taskcluster/scripts/build.sh | 10 | ||||
-rw-r--r-- | automation/taskcluster/scripts/tools.sh | 13 | ||||
-rw-r--r-- | automation/taskcluster/windows/build.sh | 8 | ||||
-rw-r--r-- | automation/taskcluster/windows/setup.sh | 15 |
5 files changed, 36 insertions, 12 deletions
diff --git a/automation/taskcluster/graph/windows/_build_base.yml b/automation/taskcluster/graph/windows/_build_base.yml index 2ba95846b..a75a7a1af 100644 --- a/automation/taskcluster/graph/windows/_build_base.yml +++ b/automation/taskcluster/graph/windows/_build_base.yml @@ -21,7 +21,7 @@ task: expires: !from_now 24 command: - - "hg clone -r %NSS_HEAD_REVISION% %NSS_HEAD_REPOSITORY% nss" + - "bash -c \"hg clone -r $NSS_HEAD_REVISION $NSS_HEAD_REPOSITORY nss || (sleep 2; hg clone -r $NSS_HEAD_REVISION $NSS_HEAD_REPOSITORY nss) || (sleep 5; hg clone -r $NSS_HEAD_REVISION $NSS_HEAD_REPOSITORY nss)\"" - "bash -c nss/automation/taskcluster/windows/build.sh" env: diff --git a/automation/taskcluster/scripts/build.sh b/automation/taskcluster/scripts/build.sh index f48cb20dc..a6a202164 100755 --- a/automation/taskcluster/scripts/build.sh +++ b/automation/taskcluster/scripts/build.sh @@ -2,9 +2,9 @@ set -v -e -x -if [ $(id -u) = 0 ]; then - source $(dirname $0)/tools.sh +source $(dirname $0)/tools.sh +if [[ $(id -u) -eq 0 ]]; then # Set compiler. switch_compilers @@ -13,12 +13,10 @@ if [ $(id -u) = 0 ]; then fi # Clone NSPR if needed. -if [ ! -d "nspr" ]; then - hg clone https://hg.mozilla.org/projects/nspr -fi +hg_clone https://hg.mozilla.org/projects/nspr nspr default # Build. -cd nss && make nss_build_all && cd .. +make -C nss nss_build_all # Generate certificates. NSS_TESTS=cert NSS_CYCLES="standard pkix sharedb" $(dirname $0)/run_tests.sh diff --git a/automation/taskcluster/scripts/tools.sh b/automation/taskcluster/scripts/tools.sh index 1c2bf103e..57f45d6be 100644 --- a/automation/taskcluster/scripts/tools.sh +++ b/automation/taskcluster/scripts/tools.sh @@ -14,3 +14,16 @@ switch_compilers() { exit 1 fi } + +# Usage: hg_clone repo dir [revision=@] +hg_clone() { + repo=$1 + dir=$2 + rev=${3:-@} + for i in 0 2 5; do + sleep $i + hg clone -r "$rev" "$repo" "$dir" && return + rm -rf "$dir" + done + exit 1 +} diff --git a/automation/taskcluster/windows/build.sh b/automation/taskcluster/windows/build.sh index 479405694..c275df54d 100644 --- a/automation/taskcluster/windows/build.sh +++ b/automation/taskcluster/windows/build.sh @@ -6,16 +6,16 @@ set -v -e -x source $(dirname $0)/setup.sh # Clone NSPR. -hg clone https://hg.mozilla.org/projects/nspr +hg_clone https://hg.mozilla.org/projects/nspr nspr default # Build. -cd nss && make nss_build_all +make -C nss nss_build_all # Generate certificates. -cd tests && NSS_TESTS=cert NSS_CYCLES="standard pkix sharedb" ./all.sh +NSS_TESTS=cert NSS_CYCLES="standard pkix sharedb" nss/tests/all.sh # Reset test counter so that test runs pick up our certificates. -cd ../../ && echo 1 > tests_results/security/localhost +echo 1 > tests_results/security/localhost # Package. 7z a public/build/dist.7z dist tests_results diff --git a/automation/taskcluster/windows/setup.sh b/automation/taskcluster/windows/setup.sh index 3d91b63c6..80cee2850 100644 --- a/automation/taskcluster/windows/setup.sh +++ b/automation/taskcluster/windows/setup.sh @@ -2,7 +2,20 @@ set -v -e -x -hg clone https://hg.mozilla.org/build/tools +# Usage: hg_clone repo dir [revision=@] +hg_clone() { + repo=$1 + dir=$2 + rev=${3:-@} + for i in 0 2 5; do + sleep $i + hg clone -r "$rev" "$repo" "$dir" && return + rm -rf "$dir" + done + exit 1 +} + +hg_clone https://hg.mozilla.org/build/tools tools default tools/scripts/tooltool/tooltool_wrapper.sh $(dirname $0)/releng.manifest https://api.pub.build.mozilla.org/tooltool/ non-existant-file.sh /c/mozilla-build/python/python.exe /c/builds/tooltool.py --authentication-file /c/builds/relengapi.tok -c /c/builds/tooltool_cache VSPATH="$(pwd)/vs2015u2" |