commit cfe76a6f83b6d0413918db23cbc876660e5396a0
parent 4082ff9e8c07e7873e12677dc28e330e16bc566b
Author: Dan Stillman <dstillman@zotero.org>
Date: Sun, 13 Nov 2016 04:54:57 -0500
Add Zotero.test, which is true during tests
(Zotero.automatedTest is only true in Travis)
Diffstat:
3 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/chrome/content/zotero/xpcom/zotero.js b/chrome/content/zotero/xpcom/zotero.js
@@ -178,6 +178,7 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
if (options) {
let opts = [
'openPane',
+ 'test',
'automatedTest',
'skipBundledFiles'
];
diff --git a/components/zotero-service.js b/components/zotero-service.js
@@ -483,6 +483,9 @@ ZoteroCommandLineHandler.prototype = {
}
}
+ if (cmdLine.handleFlag("ZoteroTest", false)) {
+ zInitOptions.test = true;
+ }
if (cmdLine.handleFlag("ZoteroAutomatedTest", false)) {
zInitOptions.automatedTest = true;
}
diff --git a/test/runtests.sh b/test/runtests.sh
@@ -134,7 +134,6 @@ if [ -z $IS_CYGWIN ]; then
echo "`MOZ_NO_REMOTE=1 NO_EM_RESTART=1 \"$FX_EXECUTABLE\" -v`"
fi
-
if [ "$TRAVIS" = true ]; then
FX_ARGS="$FX_ARGS -ZoteroAutomatedTest -ZoteroTestTimeout 10000"
fi
@@ -144,7 +143,7 @@ trap "{ rm -rf \"$PROFILE\"; }" EXIT
makePath FX_PROFILE "$PROFILE"
MOZ_NO_REMOTE=1 NO_EM_RESTART=1 "$FX_EXECUTABLE" -profile "$FX_PROFILE" \
- -chrome chrome://zotero-unit/content/runtests.html -test "$TESTS" -grep "$GREP" $FX_ARGS
+ -chrome chrome://zotero-unit/content/runtests.html -test "$TESTS" -grep "$GREP" -ZoteroTest $FX_ARGS
# Check for success
test -e "$PROFILE/success"