[junitReports] Rename reports so they are auto-discovered by CI (#21502)

In order for the runbld project we use in CI to auto-discover the junit reports we generate they need to match `TEST-*.xml`, which will allow us to include more details in the failure emails, and push failure info to the build-stats cluster.
This commit is contained in:
Spencer 2018-07-31 12:47:34 -07:00 committed by GitHub
parent 3dc5ba4960
commit 8d0b7e7f7e
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 4 additions and 4 deletions

View file

@ -104,7 +104,7 @@ export default class JestJUnitReporter {
});
});
const reportPath = resolve(rootDirectory, `target/junit/${reportName}.xml`);
const reportPath = resolve(rootDirectory, `target/junit/TEST-${reportName}.xml`);
const reportXML = root.end({
pretty: true,
indent: ' ',

View file

@ -49,7 +49,7 @@ describe('dev/mocha/junit report generation', () => {
mocha.addFile(resolve(PROJECT_DIR, 'test.js'));
await new Promise(resolve => mocha.run(resolve));
const report = await fcb(cb => parseString(readFileSync(resolve(PROJECT_DIR, 'target/junit/test.xml')), cb));
const report = await fcb(cb => parseString(readFileSync(resolve(PROJECT_DIR, 'target/junit/TEST-test.xml')), cb));
// test case results are wrapped in <testsuites></testsuites>
expect(report).to.eql({

View file

@ -131,7 +131,7 @@ export function setupJUnitReportGeneration(runner, options = {}) {
}
});
const reportPath = resolve(rootDirectory, `target/junit/${reportName}.xml`);
const reportPath = resolve(rootDirectory, `target/junit/TEST-${reportName}.xml`);
const reportXML = builder.end({
pretty: true,
indent: ' ',

View file

@ -56,7 +56,7 @@ module.exports = function (grunt) {
reporters: process.env.CI ? ['dots', 'junit'] : ['progress'],
junitReporter: {
outputFile: resolve(ROOT, 'target/junit/karma.xml'),
outputFile: resolve(ROOT, 'target/junit/TEST-karma.xml'),
useBrowserName: false,
nameFormatter: (browser, result) => [
...result.suite,