[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:
parent
3dc5ba4960
commit
8d0b7e7f7e
|
@ -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: ' ',
|
||||
|
|
|
@ -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({
|
||||
|
|
|
@ -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: ' ',
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in a new issue