Bug 915311 - Improve MOZ_HOST_BIN warnings; r=ted
authorGeoff Brown <gbrown@mozilla.com>
Tue, 05 Nov 2013 15:27:08 -0700
changeset 168249 412ab2e915cfa2e1e3e3bb5ccc921e814398bbca
parent 168248 afa169bd8be95acbb6ad278e6468829540924890
child 168250 41d4831fc39dc6baeb4f3a8526f2dbce6f6db4f2
push id3224
push userlsblakk@mozilla.com
push dateTue, 04 Feb 2014 01:06:49 +0000
treeherdermozilla-beta@60c04d0987f1 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersted
bugs915311
milestone28.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 915311 - Improve MOZ_HOST_BIN warnings; r=ted
testing/testsuite-targets.mk
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -85,31 +85,39 @@ define check_test_error_internal
   fi
 endef
 CHECK_TEST_ERROR = $(call check_test_error_internal)
 CHECK_TEST_ERROR_RERUN = $(call check_test_error_internal,"To rerun your failures please run 'make $@-rerun-failures'")
 endif
 
 mochitest-remote: DM_TRANS?=adb
 mochitest-remote:
-	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
-        echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
+	@if [ "${MOZ_HOST_BIN}" = "" ]; then \
+        echo "environment variable MOZ_HOST_BIN must be set to a directory containing host xpcshell"; \
+    elif [ ! -d ${MOZ_HOST_BIN} ]; then \
+        echo "MOZ_HOST_BIN does not specify a directory"; \
+    elif [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
+        echo "xpcshell not found in MOZ_HOST_BIN"; \
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
     else \
         $(RUN_MOCHITEST_REMOTE); \
     fi
 
 mochitest-robotium: mochitest-robocop
 	@echo "mochitest-robotium is deprecated -- please use mochitest-robocop"
 
 mochitest-robocop: DM_TRANS?=adb
 mochitest-robocop:
-	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
-        echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
+	@if [ "${MOZ_HOST_BIN}" = "" ]; then \
+        echo "environment variable MOZ_HOST_BIN must be set to a directory containing host xpcshell"; \
+    elif [ ! -d ${MOZ_HOST_BIN} ]; then \
+        echo "MOZ_HOST_BIN does not specify a directory"; \
+    elif [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
+        echo "xpcshell not found in MOZ_HOST_BIN"; \
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
     else \
         $(RUN_MOCHITEST_ROBOCOP); \
     fi
 
 ifdef MOZ_B2G
 mochitest-plain:
@@ -207,30 +215,38 @@ endif #}
 reftest: TEST_PATH?=layout/reftests/reftest.list
 reftest:
 	$(call RUN_REFTEST,"$(topsrcdir)/$(TEST_PATH)")
 	$(CHECK_TEST_ERROR)
 
 reftest-remote: TEST_PATH?=layout/reftests/reftest.list
 reftest-remote: DM_TRANS?=adb
 reftest-remote:
-	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
-        echo "please prepare your host with the environment variable MOZ_HOST_BIN"; \
+	@if [ "${MOZ_HOST_BIN}" = "" ]; then \
+        echo "environment variable MOZ_HOST_BIN must be set to a directory containing host xpcshell"; \
+    elif [ ! -d ${MOZ_HOST_BIN} ]; then \
+        echo "MOZ_HOST_BIN does not specify a directory"; \
+    elif [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
+        echo "xpcshell not found in MOZ_HOST_BIN"; \
     elif [ "${TEST_DEVICE}" = "" -a "$(DM_TRANS)" != "adb" ]; then \
         echo "please prepare your host with the environment variable TEST_DEVICE"; \
     else \
         ln -s $(abspath $(topsrcdir)) _tests/reftest/tests; \
         $(call REMOTE_REFTEST,tests/$(TEST_PATH)); \
         $(CHECK_TEST_ERROR); \
     fi
 
 reftest-b2g: TEST_PATH?=layout/reftests/reftest.list
 reftest-b2g:
-	@if [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
-        echo "please set the MOZ_HOST_BIN environment variable"; \
+	@if [ "${MOZ_HOST_BIN}" = "" ]; then \
+		echo "environment variable MOZ_HOST_BIN must be set to a directory containing host xpcshell"; \
+	elif [ ! -d ${MOZ_HOST_BIN} ]; then \
+		echo "MOZ_HOST_BIN does not specify a directory"; \
+	elif [ ! -f ${MOZ_HOST_BIN}/xpcshell ]; then \
+		echo "xpcshell not found in MOZ_HOST_BIN"; \
 	elif [ "${B2G_PATH}" = "" -o "${ADB_PATH}" = "" ]; then \
 		echo "please set the B2G_PATH and ADB_PATH environment variables"; \
 	else \
         ln -s $(abspath $(topsrcdir)) _tests/reftest/tests; \
 		if [ "${REFTEST_PATH}" != "" ]; then \
 			$(call RUN_REFTEST_B2G,tests/${REFTEST_PATH}); \
 		else \
 			$(call RUN_REFTEST_B2G,tests/$(TEST_PATH)); \