Skip to content
This repository has been archived by the owner on Nov 3, 2021. It is now read-only.

Commit

Permalink
Bug 987383 - Make sure to deal with empty output so that JSON stay va…
Browse files Browse the repository at this point in the history
…lid. r=
  • Loading branch information
hfiguiere committed Apr 17, 2014
1 parent e93105b commit 9dcd695
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions bin/gaia-perf-marionette
Expand Up @@ -61,7 +61,7 @@ for app in $APPS; do
# wrap marionette-mocha with gaia's defaults. We also need to alter the paths to
# xpcshell in available for email fake servers.
export CURRENT_APP="$app"
PATH=$XPCSHELL_DIR:$PATH $DIR/../node_modules/.bin/marionette-mocha \
OUT=`PATH=$XPCSHELL_DIR:$PATH $DIR/../node_modules/.bin/marionette-mocha \
--timeout 10s \
--ui tdd \
--profile-builder $SHARED/profile_builder.js \
Expand All @@ -70,6 +70,13 @@ for app in $APPS; do
$SHARED/setup.js \
$GAIA_DIR/tests/performance/perf.js $SHARED_PERF $FILES_PERF \
-R "$GAIA_DIR/tests/reporters/jsonmozperf.js" \
$@ >&3
$@`
# Bug 987383 if there is no output report an error.
if [ -z "$OUT" ]; then
echo "$CURRENT_APP returned no output." >&2
echo "{ \"stats\": { \"suites\": 1, \"failures\": 1, \"error\": \"No output !\", \"application\": \""$CURRENT_APP"\" } }" >&3
else
echo "$OUT" >&3
fi
done
echo ']' >&3

0 comments on commit 9dcd695

Please sign in to comment.