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 #33257 from nullaus/bug1225559
Browse files Browse the repository at this point in the history
Bug 1225559 - Output list of test files that will get run after apply…
  • Loading branch information
nullaus committed Nov 19, 2015
2 parents c9b0203 + 4ba79af commit a73d6ac
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
8 changes: 6 additions & 2 deletions bin/gaia-marionette/gaia-marionette
Expand Up @@ -105,7 +105,6 @@ if [ -n "$PART" ] ; then
# spaces
echo "$TEST_FILES" | sort > $TEMP_FILE
TEST_FILES=$(split -n l/$PART/$NBPARTS $TEMP_FILE)
echo -e "------- Will run the following test files:\n$TEST_FILES\n-------"
rm -f $TEMP_FILE
fi

Expand Down Expand Up @@ -189,9 +188,14 @@ if [ ! -z $TEST_MANIFEST ]; then
TEST_FILES="$("$DIR/apply-manifest" $TEST_MANIFEST $TEST_FILES)"
fi

# Now that we've applied the manifest we can actually report which tests
# will get run.
PRETTY_TEST_FILES=$(echo $TEST_FILES | tr " " "\n" | sort)
echo -e "------- Will run the following test files:\n$PRETTY_TEST_FILES\n-------"

# We export _RETRY_TEST_FILES here to enable gaia_marionette_retry to self
# diagnose in the case where we told it to run tests but it ran none.
export _RETRY_TEST_FILES
export _RETRY_TEST_FILES=$TEST_FILES

# wrap marionette-mocha with gaia's defaults. We also need to alter the paths to
# xpcshell in available for email fake servers.
Expand Down
4 changes: 3 additions & 1 deletion bin/gaia-marionette/gaia_marionette_retry.js
Expand Up @@ -174,6 +174,8 @@ function runTest(filename, args, retry) {
var command = path.resolve(__dirname, '../.bin/marionette-mocha');
args = args.concat(filename);

console.log('Running tests in ', filename);

var jsmarionette = spawn(command, args);
var stdout = '',
stderr = '';
Expand Down Expand Up @@ -220,7 +222,7 @@ function runTest(filename, args, retry) {
function testDidFailOnTbpl(stdout, stderr) {
// Ensure we captured output before deciding if the test failed or not.
return stdout.length &&
(stdout.indexOf('TEST-UNEXPECTED-FAIL') !== -1 ||
(stdout.indexOf('TEST-UNEXPECTED') !== -1 ||
stdout.indexOf('*~*~*') === -1);
}

Expand Down

0 comments on commit a73d6ac

Please sign in to comment.