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

Commit

Permalink
Merge pull request #15288 from hfiguiere/bug958652
Browse files Browse the repository at this point in the history
Bug 958652 - pass MOZPERFOUT to redirect mozperf JSON data to a file. Default == stdout. r=julienw
  • Loading branch information
hfiguiere committed Jan 15, 2014
2 parents 34b01ea + f77b05e commit 86fdc9e
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 4 deletions.
3 changes: 3 additions & 0 deletions Makefile
Expand Up @@ -15,6 +15,8 @@
# #
# REPORTER : Mocha reporter to use for test output. #
# #
# MOZPERFOUT : File path to output mozperf data. Empty mean stdout. #
# #
# MARIONETTE_RUNNER_HOST : The Marionnette runner host. #
# Current values can be 'marionette-b2gdesktop-host' #
# and 'marionette-device-host' #
Expand Down Expand Up @@ -139,6 +141,7 @@ NPM_REGISTRY?=http://registry.npmjs.org
# Ensure that NPM only logs warnings and errors
export npm_config_loglevel=warn
MARIONETTE_RUNNER_HOST?=marionette-b2gdesktop-host
MOZPERFOUT?=""

GAIA_INSTALL_PARENT?=/system/b2g

Expand Down
14 changes: 10 additions & 4 deletions bin/gaia-perf-marionette
Expand Up @@ -5,6 +5,12 @@ SOURCE="${BASH_SOURCE[0]}"
# Make it an absolute path
DIR="$( cd "$( dirname "$SOURCE" )" && pwd )"

if [ -z "$MOZPERFOUT" ] ; then
exec 3>&1
else
exec 3>"$MOZPERFOUT"
fi

# where all gaia specific customizations for mocha-marionette live.
SHARED=$GAIA_DIR/shared/test/integration

Expand Down Expand Up @@ -47,13 +53,13 @@ fi


# All echo calls help create a JSON array
echo '['
echo '[' >&3
SHARED_PERF=`find tests/performance -name "*_test.js" -type f`
for app in $APPS; do
if [ -z "$FIRST_LOOP_ITERATION" ]; then
FIRST_LOOP_ITERATION=done
else
echo ','
echo ',' >&3
fi
FILES_PERF=`test -d apps/$app/test/performance && find apps/$app/test/performance -name "*_test.js" -type f`
# wrap marionette-mocha with gaia's defaults. We also need to alter the paths to
Expand All @@ -68,6 +74,6 @@ 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
done
echo ']'
echo ']' >&3

0 comments on commit 86fdc9e

Please sign in to comment.