Merge mozilla-central to mozilla-inbound
This commit is contained in:
@@ -8,7 +8,7 @@
|
||||
<uses-sdk android:minSdkVersion="8" />
|
||||
|
||||
<instrumentation
|
||||
android:name="android.test.InstrumentationTestRunner"
|
||||
android:name="@ANDROID_PACKAGE_NAME@.FennecInstrumentationTestRunner"
|
||||
android:targetPackage="@ANDROID_PACKAGE_NAME@" />
|
||||
|
||||
<application
|
||||
|
||||
25
build/mobile/robocop/FennecInstrumentationTestRunner.java.in
Normal file
25
build/mobile/robocop/FennecInstrumentationTestRunner.java.in
Normal file
@@ -0,0 +1,25 @@
|
||||
#filter substitution
|
||||
/* 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/. */
|
||||
|
||||
package @ANDROID_PACKAGE_NAME@;
|
||||
|
||||
import android.os.Bundle;
|
||||
import android.test.InstrumentationTestRunner;
|
||||
|
||||
public class FennecInstrumentationTestRunner extends InstrumentationTestRunner {
|
||||
private static Bundle sArguments;
|
||||
|
||||
@Override
|
||||
public void onCreate(Bundle arguments) {
|
||||
super.onCreate(arguments);
|
||||
sArguments = arguments;
|
||||
}
|
||||
|
||||
// unfortunately we have to make this static because test classes that don't extend
|
||||
// from ActivityInstrumentationTestCase2 can't get a reference to this class.
|
||||
public static Bundle getArguments() {
|
||||
return sArguments;
|
||||
}
|
||||
}
|
||||
@@ -41,6 +41,7 @@ public class FennecNativeDriver implements Driver {
|
||||
private HashMap mLocators = null;
|
||||
private Activity mActivity;
|
||||
private Solo mSolo;
|
||||
private String mRootPath;
|
||||
|
||||
private static String mLogFile = null;
|
||||
private static LogLevel mLogLevel = LogLevel.INFO;
|
||||
@@ -76,12 +77,13 @@ public class FennecNativeDriver implements Driver {
|
||||
}
|
||||
}
|
||||
|
||||
public FennecNativeDriver(Activity activity, Solo robocop) {
|
||||
public FennecNativeDriver(Activity activity, Solo robocop, String rootPath) {
|
||||
mActivity = activity;
|
||||
mSolo = robocop;
|
||||
mRootPath = rootPath;
|
||||
|
||||
// Set up table of fennec_ids.
|
||||
mLocators = convertTextToTable(getFile("/mnt/sdcard/fennec_ids.txt"));
|
||||
mLocators = convertTextToTable(getFile(mRootPath + "/fennec_ids.txt"));
|
||||
|
||||
// Set up reflexive access of java classes and methods.
|
||||
try {
|
||||
@@ -266,7 +268,7 @@ public class FennecNativeDriver implements Driver {
|
||||
int w = view.getWidth();
|
||||
int h = view.getHeight();
|
||||
pixelBuffer.position(0);
|
||||
String mapFile = "/mnt/sdcard/pixels.map";
|
||||
String mapFile = mRootPath + "/pixels.map";
|
||||
|
||||
FileOutputStream fos = null;
|
||||
BufferedOutputStream bos = null;
|
||||
|
||||
@@ -22,6 +22,7 @@ _JAVA_HARNESS = \
|
||||
Assert.java \
|
||||
Driver.java \
|
||||
Element.java \
|
||||
FennecInstrumentationTestRunner.java \
|
||||
FennecNativeActions.java \
|
||||
FennecMochitestAssert.java \
|
||||
FennecTalosAssert.java \
|
||||
|
||||
@@ -56,8 +56,9 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
|
||||
@Override
|
||||
protected void setUp() throws Exception {
|
||||
// Load config file from sdcard (setup by python script)
|
||||
String configFile = FennecNativeDriver.getFile("/mnt/sdcard/robotium.config");
|
||||
// Load config file from root path (setup by python script)
|
||||
String rootPath = FennecInstrumentationTestRunner.getArguments().getString("deviceroot");
|
||||
String configFile = FennecNativeDriver.getFile(rootPath + "/robotium.config");
|
||||
HashMap config = FennecNativeDriver.convertTextToTable(configFile);
|
||||
|
||||
// Create the intent to be used with all the important arguments.
|
||||
@@ -84,7 +85,7 @@ abstract class BaseTest extends ActivityInstrumentationTestCase2<Activity> {
|
||||
|
||||
// Set up Robotium.solo and Driver objects
|
||||
mSolo = new Solo(getInstrumentation(), mActivity);
|
||||
mDriver = new FennecNativeDriver(mActivity, mSolo);
|
||||
mDriver = new FennecNativeDriver(mActivity, mSolo, rootPath);
|
||||
mActions = new FennecNativeActions(mActivity, mSolo, getInstrumentation(), mAsserter);
|
||||
}
|
||||
|
||||
|
||||
34
mobile/android/config/mozconfigs/android-noion/nightly
Normal file
34
mobile/android/config/mozconfigs/android-noion/nightly
Normal file
@@ -0,0 +1,34 @@
|
||||
. "$topsrcdir/mobile/android/config/mozconfigs/common"
|
||||
|
||||
# Global options
|
||||
mk_add_options MOZ_MAKE_FLAGS="-j4"
|
||||
|
||||
# Build Fennec
|
||||
ac_add_options --enable-application=mobile/android
|
||||
|
||||
# Android
|
||||
ac_add_options --target=arm-linux-androideabi
|
||||
ac_add_options --with-android-ndk="/tools/android-ndk-r5c"
|
||||
ac_add_options --with-android-sdk="/tools/android-sdk-r16/platforms/android-16"
|
||||
ac_add_options --with-android-version=5
|
||||
ac_add_options --with-system-zlib
|
||||
ac_add_options --enable-update-channel=${MOZ_UPDATE_CHANNEL}
|
||||
|
||||
# IonMonkey disabled in bug 789373
|
||||
ac_add_options --disable-ion
|
||||
|
||||
export JAVA_HOME=/tools/jdk6
|
||||
export MOZILLA_OFFICIAL=1
|
||||
export MOZ_TELEMETRY_REPORTING=1
|
||||
|
||||
ac_add_options --with-branding=mobile/android/branding/nightly
|
||||
|
||||
# Treat warnings as errors in directories with FAIL_ON_WARNINGS.
|
||||
ac_add_options --enable-warnings-as-errors
|
||||
|
||||
# Use ccache
|
||||
ac_add_options --with-ccache=/usr/bin/ccache
|
||||
|
||||
# This will overwrite the default of stripping everything and keep the symbol table.
|
||||
# This is useful for profiling with eideticker. See bug 788680
|
||||
STRIP_FLAGS="--strip-debug"
|
||||
@@ -427,14 +427,13 @@ def main():
|
||||
fHandle.close()
|
||||
deviceRoot = dm.getDeviceRoot()
|
||||
|
||||
# Note, we are pushing to /sdcard since we have this location hard coded in robocop
|
||||
dm.removeFile("/sdcard/fennec_ids.txt")
|
||||
dm.removeFile("/sdcard/robotium.config")
|
||||
dm.pushFile("robotium.config", "/sdcard/robotium.config")
|
||||
dm.removeFile(os.path.join(deviceRoot, "fennec_ids.txt"))
|
||||
dm.removeFile(os.path.join(deviceRoot, "robotium.config"))
|
||||
dm.pushFile("robotium.config", os.path.join(deviceRoot, "robotium.config"))
|
||||
fennec_ids = os.path.abspath("fennec_ids.txt")
|
||||
if not os.path.exists(fennec_ids) and options.robocopIds:
|
||||
fennec_ids = options.robocopIds
|
||||
dm.pushFile(fennec_ids, "/sdcard/fennec_ids.txt")
|
||||
dm.pushFile(fennec_ids, os.path.join(deviceRoot, "fennec_ids.txt"))
|
||||
options.extraPrefs.append('robocop.logfile="%s/robocop.log"' % deviceRoot)
|
||||
|
||||
if (options.dm_trans == 'adb' and options.robocopPath):
|
||||
@@ -448,9 +447,9 @@ def main():
|
||||
continue
|
||||
|
||||
options.app = "am"
|
||||
options.browserArgs = ["instrument", "-w", "-e", "class"]
|
||||
options.browserArgs = ["instrument", "-w", "-e", "deviceroot", deviceRoot, "-e", "class"]
|
||||
options.browserArgs.append("%s.tests.%s" % (appname, test['name']))
|
||||
options.browserArgs.append("org.mozilla.roboexample.test/android.test.InstrumentationTestRunner")
|
||||
options.browserArgs.append("org.mozilla.roboexample.test/%s.FennecInstrumentationTestRunner" % appname)
|
||||
|
||||
try:
|
||||
dm.recordLogcat()
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
{
|
||||
"talos.zip": {
|
||||
"url": "http://build.mozilla.org/talos/zips/talos.2605620aa7fc.zip",
|
||||
"url": "http://build.mozilla.org/talos/zips/talos.f0e890e6d628.zip",
|
||||
"path": ""
|
||||
}
|
||||
}
|
||||
|
||||
@@ -566,19 +566,20 @@ MOZ_SIGN_PACKAGE_CMD=$(MOZ_SIGN_CMD) $(foreach f,$(MOZ_EXTERNAL_SIGNING_FORMAT),
|
||||
endif
|
||||
|
||||
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
|
||||
ifeq (Darwin, $(OS_ARCH))
|
||||
MAKE_PACKAGE = cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
|
||||
ifeq (Darwin, $(OS_ARCH))
|
||||
MAKE_PACKAGE = $(PREPARE_PACKAGE) \
|
||||
&& cd ./$(PKG_DMG_SOURCE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) $(MOZ_MACBUNDLE_NAME) \
|
||||
&& rm $(MOZ_MACBUNDLE_NAME)/Contents/CodeResources \
|
||||
&& cp $(MOZ_MACBUNDLE_NAME)/Contents/_CodeSignature/CodeResources $(MOZ_MACBUNDLE_NAME)/Contents \
|
||||
&& cd $(PACKAGE_BASE_DIR) \
|
||||
&& $(INNER_MAKE_PACKAGE)
|
||||
else
|
||||
MAKE_PACKAGE = $(MOZ_SIGN_PREPARED_PACKAGE_CMD) \
|
||||
MAKE_PACKAGE = $(PREPARE_PACKAGE) && $(MOZ_SIGN_PREPARED_PACKAGE_CMD) \
|
||||
$(MOZ_PKG_DIR) && $(INNER_MAKE_PACKAGE)
|
||||
endif #Darwin
|
||||
|
||||
else
|
||||
MAKE_PACKAGE = $(INNER_MAKE_PACKAGE)
|
||||
MAKE_PACKAGE = $(PREPARE_PACKAGE) && $(INNER_MAKE_PACKAGE)
|
||||
endif
|
||||
|
||||
ifdef MOZ_SIGN_PACKAGE_CMD
|
||||
@@ -719,13 +720,19 @@ $(PERL) -I$(MOZILLA_DIR)/toolkit/mozapps/installer -e 'use Packager; \
|
||||
Packager::Copy($1,$2,$3,$4,$5,$(MOZ_PKG_FATAL_WARNINGS),$6,$7);'
|
||||
endef
|
||||
|
||||
installer-stage: prepare-package
|
||||
installer-stage: stage-package
|
||||
ifndef MOZ_PKG_MANIFEST
|
||||
$(error MOZ_PKG_MANIFEST unspecified!)
|
||||
endif
|
||||
@rm -rf $(DEPTH)/installer-stage $(DIST)/xpt
|
||||
@echo "Staging installer files..."
|
||||
@$(NSINSTALL) -D $(DEPTH)/installer-stage/core
|
||||
ifdef MOZ_OMNIJAR
|
||||
@(cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR))
|
||||
ifdef MOZ_WEBAPP_RUNTIME
|
||||
@(cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/webapprt && $(PACK_OMNIJAR_WEBAPP_RUNTIME))
|
||||
endif
|
||||
endif
|
||||
@cp -av $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/. $(DEPTH)/installer-stage/core
|
||||
@(cd $(DEPTH)/installer-stage/core && $(CREATE_PRECOMPLETE_CMD))
|
||||
ifdef MOZ_SIGN_PREPARED_PACKAGE_CMD
|
||||
@@ -852,10 +859,7 @@ ifdef MOZ_PACKAGE_JSSHELL
|
||||
endif # MOZ_PACKAGE_JSSHELL
|
||||
endif # LIBXUL_SDK
|
||||
|
||||
prepare-package: stage-package
|
||||
cd $(DIST) && $(PREPARE_PACKAGE)
|
||||
|
||||
make-package-internal: prepare-package $(PACKAGE_XULRUNNER) make-sourcestamp-file
|
||||
make-package-internal: stage-package $(PACKAGE_XULRUNNER) make-sourcestamp-file
|
||||
@echo "Compressing..."
|
||||
cd $(DIST) && $(MAKE_PACKAGE)
|
||||
|
||||
@@ -883,12 +887,18 @@ make-sourcestamp-file::
|
||||
# dist/idl -> prefix/share/idl/appname-version
|
||||
# dist/sdk/lib -> prefix/lib/appname-devel-version/lib
|
||||
# prefix/lib/appname-devel-version/* symlinks to the above directories
|
||||
install:: prepare-package
|
||||
install:: stage-package
|
||||
ifeq ($(OS_ARCH),WINNT)
|
||||
$(error "make install" is not supported on this platform. Use "make package" instead.)
|
||||
endif
|
||||
ifeq (bundle,$(MOZ_FS_LAYOUT))
|
||||
$(error "make install" is not supported on this platform. Use "make package" instead.)
|
||||
endif
|
||||
ifdef MOZ_OMNIJAR
|
||||
cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH) && $(PACK_OMNIJAR)
|
||||
ifdef MOZ_WEBAPP_RUNTIME
|
||||
cd $(DIST)/$(STAGEPATH)$(MOZ_PKG_DIR)$(_BINPATH)/webapprt && $(PACK_OMNIJAR_WEBAPP_RUNTIME)
|
||||
endif
|
||||
endif
|
||||
$(NSINSTALL) -D $(DESTDIR)$(installdir)
|
||||
(cd $(DIST)/$(MOZ_PKG_DIR) && tar $(TAR_CREATE_FLAGS) - .) | \
|
||||
|
||||
Reference in New Issue
Block a user