This repository has been archived by the owner on Nov 3, 2021. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug 775281: New xpcshell test frontend for B2G. r=dhylands
- Loading branch information
Showing
2 changed files
with
59 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,56 @@ | ||
#!/bin/bash | ||
|
||
B2G_DIR=$(cd `dirname $0`/..; pwd) | ||
. $B2G_DIR/load-config.sh | ||
|
||
# Use default Gecko location if it's not provided in .config. | ||
if [ -z $GECKO_PATH ]; then | ||
GECKO_PATH=$B2G_DIR/gecko | ||
fi | ||
|
||
BUSYBOX=$B2G_DIR/gaia/build/busybox-armv6l | ||
TEST_PACKAGE_STAGE_DIR=$GECKO_OBJDIR/dist/test-package-stage | ||
TESTING_MODULES_DIR=$TEST_PACKAGE_STAGE_DIR/modules | ||
|
||
XPCSHELL_FLAGS+=" --b2gpath $B2G_DIR \ | ||
--use-device-libs \ | ||
--busybox $BUSYBOX \ | ||
--testing-modules-dir $TESTING_MODULES_DIR" | ||
|
||
OUT_HOST=$B2G_DIR/out/host/`uname -s | tr "[[:upper:]]" "[[:lower:]]"`-x86 | ||
ADB=${ADB:-$OUT_HOST/bin/adb} | ||
XPCSHELL_FLAGS+=" --adbpath $ADB" | ||
|
||
if [ "$DEVICE" = "generic" ]; then | ||
XPCSHELL_FLAGS+=" --emulator arm" | ||
elif [ "$DEVICE" = "generic_x86" ]; then | ||
XPCSHELL_FLAGS+=" --emulator x86" | ||
fi | ||
|
||
XPCSHELL_MANIFEST=tests/xpcshell_b2g.ini | ||
while [ $# -gt 0 ]; do | ||
case "$1" in | ||
--manifest) | ||
shift; XPCSHELL_MANIFEST=$1 ;; | ||
--manifest=*) | ||
XPCSHELL_MANIFEST=${1:11} ;; | ||
*) | ||
XPCSHELL_FLAGS+=" $1" ;; | ||
esac | ||
shift | ||
done | ||
|
||
XPCSHELL_FLAGS+=" --manifest $XPCSHELL_MANIFEST" | ||
SCRIPT=$GECKO_PATH/testing/marionette/client/marionette/venv_mochitest.sh | ||
PYTHON=`which python` | ||
|
||
set -e | ||
if [ ! -d "$TEST_PACKAGE_STAGE_DIR" ]; then | ||
cd $GECKO_OBJDIR | ||
make package-tests | ||
fi | ||
|
||
set -x | ||
GECKO_OBJDIR=$GECKO_OBJDIR \ | ||
TEST_PWD=$TEST_PACKAGE_STAGE_DIR/xpcshell \ | ||
bash $SCRIPT "$PYTHON" $XPCSHELL_FLAGS $@ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters