zarro 1.111.0 → 1.112.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/gulp-tasks/test-dotnet.js +22 -3
- package/package.json +1 -1
|
@@ -26,7 +26,9 @@ const
|
|
|
26
26
|
gatherPaths = requireModule("gather-paths"),
|
|
27
27
|
{ test } = requireModule("dotnet-cli"),
|
|
28
28
|
{ resolveTestPrefixFor } = requireModule("test-utils"),
|
|
29
|
+
buildReportFolder = path.dirname(env.resolve("BUILD_REPORT_XML")),
|
|
29
30
|
netFrameworkTestAssemblyFilter = requireModule("net-framework-test-assembly-filter");
|
|
31
|
+
const { baseName, chopExtension } = require("./modules/path-utils");
|
|
30
32
|
|
|
31
33
|
gulp.task(
|
|
32
34
|
"test-dotnet",
|
|
@@ -59,7 +61,6 @@ const myTasks = [ "test-dotnet", "quick-test-dotnet" ],
|
|
|
59
61
|
env.associate(myVars, myTasks);
|
|
60
62
|
|
|
61
63
|
async function runTests() {
|
|
62
|
-
const buildReportFolder = path.dirname(env.resolve("BUILD_REPORT_XML"));
|
|
63
64
|
if (!fs.existsSync(buildReportFolder)) {
|
|
64
65
|
fs.mkdirSync(buildReportFolder);
|
|
65
66
|
}
|
|
@@ -166,6 +167,7 @@ function testWithNunitCli(configuration, source) {
|
|
|
166
167
|
async function testAsDotnetCore(configuration, testProjects) {
|
|
167
168
|
const
|
|
168
169
|
testResults = {
|
|
170
|
+
quackersEnabled: false,
|
|
169
171
|
passed: 0,
|
|
170
172
|
failed: 0,
|
|
171
173
|
skipped: 0,
|
|
@@ -204,13 +206,18 @@ async function testAsDotnetCore(configuration, testProjects) {
|
|
|
204
206
|
target = p;
|
|
205
207
|
chains[idx] = chains[idx].then(async () => {
|
|
206
208
|
debug(`${ idx } start test run: ${ target }`);
|
|
207
|
-
const result = testOneProject(target, configuration, verbosity, testResults, true);
|
|
209
|
+
const result = await testOneProject(target, configuration, verbosity, testResults, true);
|
|
208
210
|
testProcessResults.push(result);
|
|
209
211
|
return result;
|
|
210
212
|
});
|
|
211
213
|
}
|
|
212
214
|
await Promise.all(chains);
|
|
213
|
-
|
|
215
|
+
|
|
216
|
+
if (testResults.quackersEnabled) {
|
|
217
|
+
logOverallResults(testResults);
|
|
218
|
+
} else {
|
|
219
|
+
console.log("If you install Quackers.TestLogger into your test projects, you'll get a lot more info here!");
|
|
220
|
+
}
|
|
214
221
|
throwIfAnyFailed(testProcessResults);
|
|
215
222
|
}
|
|
216
223
|
|
|
@@ -319,6 +326,8 @@ async function testOneProject(
|
|
|
319
326
|
loggers = useQuackers
|
|
320
327
|
? generateQuackersLoggerConfig(target)
|
|
321
328
|
: generateBuiltinConsoleLoggerConfig();
|
|
329
|
+
addTrxLoggerTo(loggers, target);
|
|
330
|
+
testResults.quackersEnabled = testResults.quackersEnabled || useQuackers;
|
|
322
331
|
return await test({
|
|
323
332
|
target,
|
|
324
333
|
verbosity,
|
|
@@ -330,6 +339,16 @@ async function testOneProject(
|
|
|
330
339
|
});
|
|
331
340
|
}
|
|
332
341
|
|
|
342
|
+
function addTrxLoggerTo(loggers, target) {
|
|
343
|
+
const
|
|
344
|
+
proj = baseName(target),
|
|
345
|
+
projName = chopExtension(proj),
|
|
346
|
+
logFileName = path.join(buildReportFolder, `${ projName }.trx`);
|
|
347
|
+
loggers.trx = {
|
|
348
|
+
logFileName
|
|
349
|
+
};
|
|
350
|
+
}
|
|
351
|
+
|
|
333
352
|
function quackersStdOutHandler(state, s) {
|
|
334
353
|
s = s || "";
|
|
335
354
|
if (s.startsWith(quackersFullSummaryStartMarker)) {
|