Bug 1065773 - Part 3: Add release signed instrumentation test APKs to instrumentation/ in tests package. r=mshal
authorNick Alexander <nalexander@mozilla.com>
Fri, 19 Sep 2014 13:52:56 -0700
changeset 229506 319f56b07340952556455c744bee9b808c900d21
parent 229505 a044f9ca2e1be2a5512b51a8aff35f2ddb0f9941
child 229507 3a8b8b81aeb943e906fd79c52091008f2007469c
push id4187
push userbhearsum@mozilla.com
push dateFri, 28 Nov 2014 15:29:12 +0000
treeherdermozilla-beta@f23cc6a30c11 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmshal
bugs1065773
milestone35.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 1065773 - Part 3: Add release signed instrumentation test APKs to instrumentation/ in tests package. r=mshal
mobile/android/app.mozbuild
testing/instrumentation/Makefile.in
testing/instrumentation/moz.build
testing/instrumentation/runinstrumentation.py
testing/testsuite-targets.mk
--- a/mobile/android/app.mozbuild
+++ b/mobile/android/app.mozbuild
@@ -4,13 +4,16 @@
 # file, You can obtain one at http://mozilla.org/MPL/2.0/.
 
 if not CONFIG['LIBXUL_SDK']:
     include('/toolkit/toolkit.mozbuild')
 
 elif CONFIG['ENABLE_TESTS']:
     add_tier_dir('testharness', 'testing/mochitest')
 
+if CONFIG['ENABLE_TESTS']:
+    add_tier_dir('testharness', 'testing/instrumentation')
+
 if CONFIG['MOZ_EXTENSIONS']:
     add_tier_dir('app', 'extensions')
 
 add_tier_dir('app', CONFIG['MOZ_BRANDING_DIRECTORY'])
 add_tier_dir('app', 'mobile/android')
new file mode 100644
--- /dev/null
+++ b/testing/instrumentation/Makefile.in
@@ -0,0 +1,24 @@
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+_DEST_DIR = $(DEPTH)/_tests/instrumentation
+PKG_STAGE = $(DIST)/test-stage
+
+include $(topsrcdir)/config/rules.mk
+
+# Fennec and all instrumentation tests need to be signed with the same
+# key, which means release signing them all.
+
+JAVA_CLASSPATH = $(ANDROID_SDK)/android.jar
+include $(topsrcdir)/config/android-common.mk
+
+stage-package:
+	$(NSINSTALL) -D $(_DEST_DIR)
+	$(call RELEASE_SIGN_ANDROID_APK,\
+		$(DEPTH)/mobile/android/tests/background/junit3/background-junit3-debug-unsigned-unaligned.apk,\
+		$(_DEST_DIR)/background-junit3.apk)
+	$(call RELEASE_SIGN_ANDROID_APK,\
+		$(DEPTH)/mobile/android/tests/browser/junit3/browser-junit3-debug-unsigned-unaligned.apk,\
+		$(_DEST_DIR)/browser-junit3.apk)
+	@(cd $(DEPTH)/_tests/ && tar $(TAR_CREATE_FLAGS) - instrumentation) | (cd $(PKG_STAGE) && tar -xf -)
new file mode 100644
--- /dev/null
+++ b/testing/instrumentation/moz.build
@@ -0,0 +1,9 @@
+# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*-
+# vim: set filetype=python:
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+TEST_HARNESS_FILES.instrumentation += [
+    'runinstrumentation.py',
+]
new file mode 100644
--- /dev/null
+++ b/testing/instrumentation/runinstrumentation.py
@@ -0,0 +1,10 @@
+#!/usr/bin/env python
+
+# This Source Code Form is subject to the terms of the Mozilla Public
+# License, v. 2.0. If a copy of the MPL was not distributed with this
+# file, You can obtain one at http://mozilla.org/MPL/2.0/.
+
+import sys
+
+if __name__ == "__main__":
+    sys.exit(1)
--- a/testing/testsuite-targets.mk
+++ b/testing/testsuite-targets.mk
@@ -418,16 +418,17 @@ endif
 	find $(PKG_STAGE) -name '*.pyc' -exec rm {} \;
 	$(MKDIR) -p $(abspath $(DIST))/$(PKG_PATH) && \
 	cd $(PKG_STAGE) && \
 	  zip -rq9D '$(abspath $(DIST))/$(PKG_PATH)$(TEST_PACKAGE)' \
 	  * -x \*/.mkdir.done
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),android)
 package-tests: stage-android
+package-tests: stage-instrumentation-tests
 endif
 
 ifeq ($(MOZ_WIDGET_TOOLKIT),gonk)
 package-tests: stage-b2g
 endif
 
 make-stage-dir:
 	rm -rf $(PKG_STAGE)
@@ -513,18 +514,16 @@ ifeq ($(MOZ_DISABLE_STARTUPCACHE),)
 	$(NSINSTALL) $(topsrcdir)/startupcache/test/TestStartupCacheTelemetry.manifest $(PKG_STAGE)/cppunittests
 endif
 ifdef STRIP_CPP_TESTS
 	$(OBJCOPY) $(or $(STRIP_FLAGS),--strip-unneeded) $(DIST)/bin/jsapi-tests$(BIN_SUFFIX) $(PKG_STAGE)/cppunittests/jsapi-tests$(BIN_SUFFIX)
 else
 	cp -RL $(DIST)/bin/jsapi-tests$(BIN_SUFFIX) $(PKG_STAGE)/cppunittests
 endif
 
-
-
 stage-jittest: make-stage-dir
 	$(NSINSTALL) -D $(PKG_STAGE)/jit-test/tests
 	cp -RL $(topsrcdir)/js/src/jsapi.h $(PKG_STAGE)/jit-test
 	cp -RL $(topsrcdir)/js/src/jit-test $(PKG_STAGE)/jit-test/jit-test
 	cp -RL $(topsrcdir)/js/src/tests/ecma_6 $(PKG_STAGE)/jit-test/tests/ecma_6
 	cp -RL $(topsrcdir)/js/src/tests/js1_8_5 $(PKG_STAGE)/jit-test/tests/js1_8_5
 	cp -RL $(topsrcdir)/js/src/tests/lib $(PKG_STAGE)/jit-test/tests/lib
 
@@ -547,16 +546,19 @@ stage-marionette: make-stage-dir
           | (cd $(MARIONETTE_DIR)/tests && tar -xf -)
 
 stage-mozbase: make-stage-dir
 	$(MAKE) -C $(DEPTH)/testing/mozbase stage-package
 
 stage-web-platform-tests: make-stage-dir
 	$(MAKE) -C $(DEPTH)/testing/web-platform stage-package
 
+stage-instrumentation-tests: make-stage-dir
+	$(MAKE) -C $(DEPTH)/testing/instrumentation stage-package
+
 .PHONY: \
   mochitest \
   mochitest-plain \
   mochitest-chrome \
   mochitest-devtools \
   mochitest-a11y \
   mochitest-ipcplugins \
   reftest \
@@ -574,10 +576,11 @@ stage-web-platform-tests: make-stage-dir
   stage-android \
   stage-jetpack \
   stage-mozbase \
   stage-tps \
   stage-modules \
   stage-marionette \
   stage-steeplechase \
   stage-web-platform-tests \
+  stage-instrumentation-tests \
   $(NULL)