Add Zotero.test, which is true during tests

(Zotero.automatedTest is only true in Travis)
This commit is contained in:
Dan Stillman 2016-11-13 04:54:57 -05:00
parent 4082ff9e8c
commit cfe76a6f83
3 changed files with 5 additions and 2 deletions

View file

@ -178,6 +178,7 @@ Components.utils.import("resource://gre/modules/osfile.jsm");
if (options) {
let opts = [
'openPane',
'test',
'automatedTest',
'skipBundledFiles'
];

View file

@ -483,6 +483,9 @@ ZoteroCommandLineHandler.prototype = {
}
}
if (cmdLine.handleFlag("ZoteroTest", false)) {
zInitOptions.test = true;
}
if (cmdLine.handleFlag("ZoteroAutomatedTest", false)) {
zInitOptions.automatedTest = true;
}

View file

@ -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"