[Pkg-mozext-commits] [requestpolicy] 43/100: getting xpcshell tests to work

David Prévot taffit at moszumanska.debian.org
Fri Dec 12 22:56:55 UTC 2014


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch master
in repository requestpolicy.

commit b11b64b40efc9d6e35fed9da942c6aad44733674
Author: myrdd <myrdd at users.noreply.github.com>
Date:   Fri Oct 3 11:43:52 2014 +0200

    getting xpcshell tests to work
---
 tests/run-xpcshell-tests.sh | 30 ++++++++++++++++++++++++++++++
 tests/run-xpcshell.sh       |  7 +++++++
 tests/xpcshell/run_all.sh   | 17 -----------------
 tests/xpcshell/run_one.sh   | 23 -----------------------
 tests/xpcshell/xpcshell.ini |  9 +++++++++
 tests/xpcshell/xpcshell.sh  | 13 -------------
 6 files changed, 46 insertions(+), 53 deletions(-)

diff --git a/tests/run-xpcshell-tests.sh b/tests/run-xpcshell-tests.sh
new file mode 100755
index 0000000..2108c27
--- /dev/null
+++ b/tests/run-xpcshell-tests.sh
@@ -0,0 +1,30 @@
+#!/bin/bash
+
+TEST_DIR=`dirname $0`/xpcshell
+
+MOZ_SRC_DIR=/moz/mozilla-central
+MOZ_OBJ_DIR=$MOZ_SRC_DIR/obj-*
+MOZ_BIN_DIR=$MOZ_OBJ_DIR/dist/bin
+
+ARGUMENTS=""
+
+if [ -z "$1" ]; then
+  ARGUMENTS=""
+elif [ "$1" = "--help" ]; then
+  echo "Usage:"
+  echo "  $0 [test_filename.js]     (run one or all tests)"
+  exit
+else
+  ARGUMENTS=" --test-path=$1 "
+fi
+
+python -u $MOZ_SRC_DIR/config/pythonpath.py \
+  -I $MOZ_SRC_DIR/build \
+  -I $MOZ_OBJ_DIR/build \
+  -I $MOZ_SRC_DIR/testing/mozbase/mozdebug \
+  $MOZ_SRC_DIR/testing/xpcshell/runxpcshelltests.py  \
+  --build-info-json $MOZ_OBJ_DIR/mozinfo.json \
+  --no-logfiles \
+  $ARGUMENTS \
+  $MOZ_BIN_DIR/xpcshell \
+  $TEST_DIR
diff --git a/tests/run-xpcshell.sh b/tests/run-xpcshell.sh
new file mode 100755
index 0000000..974d186
--- /dev/null
+++ b/tests/run-xpcshell.sh
@@ -0,0 +1,7 @@
+#!/bin/bash
+
+MOZ_SRC_DIR=/moz/mozilla-central
+MOZ_OBJ_DIR=$MOZ_SRC_DIR/obj-*
+MOZ_BIN_DIR=$MOZ_OBJ_DIR/dist/bin
+
+$MOZ_BIN_DIR/run-mozilla.sh $MOZ_BIN_DIR/xpcshell
diff --git a/tests/xpcshell/run_all.sh b/tests/xpcshell/run_all.sh
deleted file mode 100755
index 991502f..0000000
--- a/tests/xpcshell/run_all.sh
+++ /dev/null
@@ -1,17 +0,0 @@
-#!/bin/bash
-
-TEST_DIR=`dirname $0`
-
-MOZ_SRC_DIR=/moz/z.dev1/mc
-MOZ_BIN_DIR=/moz/z.dev1/obj/dist/bin
-
-PROFILE_NAME="requestpolicy-xpcshell"
-
-python -u $MOZ_SRC_DIR/config/pythonpath.py \
-   -I$MOZ_SRC_DIR/build  \
-   $MOZ_SRC_DIR/testing/xpcshell/runxpcshelltests.py  \
-   $MOZ_BIN_DIR/xpcshell \
-   --profile-name=$PROFILE_NAME \
-   --no-logfiles \
-   $TEST_DIR
-
diff --git a/tests/xpcshell/run_one.sh b/tests/xpcshell/run_one.sh
deleted file mode 100755
index ef7f66e..0000000
--- a/tests/xpcshell/run_one.sh
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/bin/bash
-
-TEST_DIR=`dirname $0`
-
-MOZ_SRC_DIR=/moz/z.dev1/mc
-MOZ_BIN_DIR=/moz/z.dev1/obj/dist/bin
-
-PROFILE_NAME="requestpolicy-xpcshell"
-
-if [ -z "$1" ]; then
-  echo "Usage: $0 test_filename.js"
-  exit 1
-fi
-
-python -u $MOZ_SRC_DIR/config/pythonpath.py \
-   -I$MOZ_SRC_DIR/build  \
-   $MOZ_SRC_DIR/testing/xpcshell/runxpcshelltests.py  \
-   $MOZ_BIN_DIR/xpcshell \
-   --profile-name=$PROFILE_NAME \
-   --no-logfiles \
-   --test-path=$1 \
-   $TEST_DIR
-
diff --git a/tests/xpcshell/xpcshell.ini b/tests/xpcshell/xpcshell.ini
new file mode 100644
index 0000000..19cb52a
--- /dev/null
+++ b/tests/xpcshell/xpcshell.ini
@@ -0,0 +1,9 @@
+[DEFAULT]
+head = head_loadrp.js head_utils.js
+tail =
+
+[test_fileutil.js]
+[test_first.js]
+[test_policymanager.js]
+[test_policystorage.js]
+[test_subscription.js]
diff --git a/tests/xpcshell/xpcshell.sh b/tests/xpcshell/xpcshell.sh
deleted file mode 100755
index d5c48bd..0000000
--- a/tests/xpcshell/xpcshell.sh
+++ /dev/null
@@ -1,13 +0,0 @@
-#!/bin/bash
-
-TEST_DIR=`dirname $0`
-
-MOZ_SRC_DIR=/moz/z.dev1/mc
-MOZ_BIN_DIR=/moz/z.dev1/obj/dist/bin
-
-python -u $MOZ_SRC_DIR/config/pythonpath.py \
-   -I$MOZ_SRC_DIR/build  \
-   $MOZ_SRC_DIR/testing/xpcshell/runxpcshelltests.py  \
-   $MOZ_BIN_DIR/xpcshell \
-   $1
-

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-mozext/requestpolicy.git



More information about the Pkg-mozext-commits mailing list