summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Taubert <ttaubert@mozilla.com>2016-11-15 10:47:10 +0100
committerTim Taubert <ttaubert@mozilla.com>2016-11-15 10:47:10 +0100
commitc2ecee835efc98be065bee6bf2164c872f8728f5 (patch)
treede8824c03e49fc098293ff022566c2fa3b1773f0
parent8dab168bb3d73b6cbb6902289afe92618bbee30f (diff)
downloadnss-hg-c2ecee835efc98be065bee6bf2164c872f8728f5.tar.gz
Bug 1317318 - Run tests by getting the $objdir from dist/latest or generate if missing r=mt
Differential Revision: https://nss-review.dev.mozaws.net/D62
-rw-r--r--Makefile5
-rwxr-xr-xautomation/taskcluster/scripts/run_tests.sh2
-rw-r--r--tests/common/init.sh6
-rwxr-xr-xtests/run.sh9
4 files changed, 10 insertions, 12 deletions
diff --git a/Makefile b/Makefile
index 3c287286f..c824ba245 100644
--- a/Makefile
+++ b/Makefile
@@ -46,7 +46,7 @@ include $(CORE_DEPTH)/coreconf/rules.mk
# (7) Execute "local" rules. (OPTIONAL). #
#######################################################################
-nss_build_all: build_nspr all
+nss_build_all: build_nspr all latest
nss_clean_all: clobber_nspr clobber
@@ -163,3 +163,6 @@ nss_RelEng_bld: import all
package:
$(MAKE) -C pkg publish
+latest:
+ echo $(OBJDIR_NAME) > $(CORE_DEPTH)/../dist/latest
+
diff --git a/automation/taskcluster/scripts/run_tests.sh b/automation/taskcluster/scripts/run_tests.sh
index fc0bb87ab..4c87e7e32 100755
--- a/automation/taskcluster/scripts/run_tests.sh
+++ b/automation/taskcluster/scripts/run_tests.sh
@@ -14,4 +14,4 @@ fi
fetch_dist
# Run tests.
-cd nss/tests && ./run.sh
+cd nss/tests && ./all.sh
diff --git a/tests/common/init.sh b/tests/common/init.sh
index fb8e8ee76..3598e8223 100644
--- a/tests/common/init.sh
+++ b/tests/common/init.sh
@@ -282,7 +282,11 @@ if [ -z "${INIT_SOURCED}" -o "${INIT_SOURCED}" != "TRUE" ]; then
fi
if [ "${OBJDIR}" = "" ]; then
- OBJDIR=`(cd $COMMON; $MAKE objdir_name)`
+ if [ -f ${DIST}/latest ]; then
+ OBJDIR=$(cat ${DIST}/latest)
+ else
+ OBJDIR=`($MAKE -s -C $COMMON objdir_name)`
+ fi
fi
if [ "${OS_ARCH}" = "" ]; then
OS_ARCH=`(cd $COMMON; $MAKE os_arch)`
diff --git a/tests/run.sh b/tests/run.sh
deleted file mode 100755
index cbe9c47ae..000000000
--- a/tests/run.sh
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/bash
-
-base=$(dirname $0)
-
-# Determine path to build target.
-obj_dir=$(cat $base/../../dist/latest 2>/dev/null)
-
-# Run tests.
-OBJDIR=$obj_dir $base/all.sh