Permalink
Browse files

Merge pull request #214 from marshall/xpcshell

Bug 775281: New xpcshell test frontend for B2G.
  • Loading branch information...
marshall committed Feb 26, 2013
2 parents 5a335ea + fb1b36d commit f0cac45937af6213a690cc78d695da1266b8f0fc
Showing with 59 additions and 1 deletion.
  1. +56 −0 scripts/xpcshell.sh
  2. +3 −1 test.sh
View
@@ -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 $@
View
@@ -3,7 +3,7 @@
B2G_HOME=$(dirname $BASH_SOURCE)
usage() {
echo "Usage: $0 [marionette|mochitest|updates] (frontend-args)"
echo "Usage: $0 [marionette|mochitest|updates|xpcshell] (frontend-args)"
echo ""
echo "'marionette' is the default frontend"
}
@@ -22,6 +22,8 @@ case "$FRONTEND" in
SCRIPT=$B2G_HOME/scripts/marionette.sh ;;
updates)
SCRIPT=$B2G_HOME/scripts/updates.sh ;;
xpcshell)
SCRIPT=$B2G_HOME/scripts/xpcshell.sh ;;
--help|-h|help)
usage
exit 0;;

0 comments on commit f0cac45

Please sign in to comment.