zarro 1.202.0 → 1.202.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.
|
@@ -183,7 +183,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
183
183
|
});
|
|
184
184
|
await runInParallel(concurrency, ...tasks);
|
|
185
185
|
if (testResults.quackersEnabled) {
|
|
186
|
-
logOverallResults(testResults);
|
|
186
|
+
logOverallResults(testResults, testProcessResults);
|
|
187
187
|
}
|
|
188
188
|
else {
|
|
189
189
|
console.log("If you install Quackers.TestLogger into your test projects, you'll get a lot more info here!");
|
|
@@ -231,7 +231,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
231
231
|
}
|
|
232
232
|
return args.map(quote).join(" ");
|
|
233
233
|
}
|
|
234
|
-
function logOverallResults(testResults) {
|
|
234
|
+
function logOverallResults(testResults, testProcessResults) {
|
|
235
235
|
const total = testResults.passed + testResults.skipped + testResults.failed, now = Date.now(), runTimeMs = now - testResults.started, runTime = nunitLikeTime(runTimeMs), darkerThemeSelected = (process.env["QUACKERS_THEME"] || "").toLowerCase() === "darker", red = darkerThemeSelected
|
|
236
236
|
? ansiColors.red.bind(ansiColors)
|
|
237
237
|
: ansiColors.redBright.bind(ansiColors), cyan = darkerThemeSelected
|
|
@@ -239,6 +239,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
239
239
|
: ansiColors.cyanBright.bind(ansiColors), yellow = darkerThemeSelected
|
|
240
240
|
? ansiColors.yellow.bind(ansiColors)
|
|
241
241
|
: ansiColors.yellowBright.bind(ansiColors);
|
|
242
|
+
logTestSuiteTimes(testProcessResults, yellow);
|
|
242
243
|
logFailures(testResults, red);
|
|
243
244
|
logSlow(testResults, cyan);
|
|
244
245
|
console.log(yellow(`
|
|
@@ -255,6 +256,39 @@ Test Run Summary
|
|
|
255
256
|
`));
|
|
256
257
|
console.log("\n");
|
|
257
258
|
}
|
|
259
|
+
function logTestSuiteTimes(testProcessResults, yellow) {
|
|
260
|
+
if (!testProcessResults || testProcessResults.length === 0) {
|
|
261
|
+
return;
|
|
262
|
+
}
|
|
263
|
+
testProcessResults.sort((a, b) => {
|
|
264
|
+
if (a.runTimeMs === b.runTimeMs) {
|
|
265
|
+
return 0;
|
|
266
|
+
}
|
|
267
|
+
return a.runTimeMs > b.runTimeMs ? -1 : 1;
|
|
268
|
+
});
|
|
269
|
+
const assembliesAndTimes = testProcessResults.reduce((acc, cur) => {
|
|
270
|
+
const project = parseTestProjectFrom(cur.args);
|
|
271
|
+
acc.push({ project, runTimeMs: cur.runTimeMs });
|
|
272
|
+
return acc;
|
|
273
|
+
}, []);
|
|
274
|
+
console.log(yellow(`Test suite timings:`));
|
|
275
|
+
for (const r of assembliesAndTimes) {
|
|
276
|
+
console.log(yellow(` ${r.project}: ${nunitLikeTime(r.runTimeMs)}`));
|
|
277
|
+
}
|
|
278
|
+
}
|
|
279
|
+
function parseTestProjectFrom(args) {
|
|
280
|
+
let next = false;
|
|
281
|
+
for (const arg of args) {
|
|
282
|
+
if (arg === "test") {
|
|
283
|
+
next = true;
|
|
284
|
+
continue;
|
|
285
|
+
}
|
|
286
|
+
if (next) {
|
|
287
|
+
return path.basename(arg).replace(/\.dll$/i, "");
|
|
288
|
+
}
|
|
289
|
+
}
|
|
290
|
+
return `(project name parse failed for:) ${args.join(" ")}`;
|
|
291
|
+
}
|
|
258
292
|
function logSlow(testResults, cyan) {
|
|
259
293
|
logResultsSection(testResults.slowSummary, cyan("Slow tests:"), QUACKERS_SLOW_INDEX_PLACEHOLDER);
|
|
260
294
|
}
|
|
@@ -328,7 +362,7 @@ Test Run Summary
|
|
|
328
362
|
// addTrxLoggerTo(loggers, target);
|
|
329
363
|
testResults.quackersEnabled = testResults.quackersEnabled || useQuackers;
|
|
330
364
|
try {
|
|
331
|
-
|
|
365
|
+
return await test({
|
|
332
366
|
target,
|
|
333
367
|
verbosity: finalVerbosity,
|
|
334
368
|
configuration,
|
|
@@ -342,12 +376,10 @@ Test Run Summary
|
|
|
342
376
|
env: testEnvironment,
|
|
343
377
|
label
|
|
344
378
|
});
|
|
345
|
-
return result;
|
|
346
379
|
}
|
|
347
380
|
catch (e) {
|
|
348
381
|
debug("WARN: catching SystemError instead of rethrowing it");
|
|
349
|
-
|
|
350
|
-
return err;
|
|
382
|
+
return e;
|
|
351
383
|
}
|
|
352
384
|
}
|
|
353
385
|
function addTrxLoggerTo(loggers, target) {
|
|
@@ -557,6 +589,7 @@ Test Run Summary
|
|
|
557
589
|
testWithNunitCli,
|
|
558
590
|
shouldTestInParallel,
|
|
559
591
|
testOneDotNetCoreProject,
|
|
560
|
-
testAsDotNetCore
|
|
592
|
+
testAsDotNetCore,
|
|
593
|
+
logTestSuiteTimes
|
|
561
594
|
};
|
|
562
595
|
})();
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "zarro",
|
|
3
|
-
"version": "1.202.
|
|
3
|
+
"version": "1.202.1",
|
|
4
4
|
"description": "Some glue to make gulp easier, perhaps even zero- or close-to-zero-conf",
|
|
5
5
|
"bin": {
|
|
6
6
|
"zarro": "index.js"
|
|
@@ -87,6 +87,7 @@
|
|
|
87
87
|
"sax": "^1.2.4",
|
|
88
88
|
"semver": "^7.5.4",
|
|
89
89
|
"simple-git": "^3.25.0",
|
|
90
|
+
"system-wrapper": "^1.8.0",
|
|
90
91
|
"temp": "^0.9.4",
|
|
91
92
|
"through2": "^3.0.2",
|
|
92
93
|
"undertaker-forward-reference": "^1.0.2",
|
package/types.d.ts
CHANGED
|
@@ -276,12 +276,14 @@ declare global {
|
|
|
276
276
|
}
|
|
277
277
|
|
|
278
278
|
type DotNetTester = (configuration: string, source: string[]) => Promise<TestResults>;
|
|
279
|
+
type ResultOrError = SystemResult | SystemError;
|
|
279
280
|
|
|
280
281
|
interface TestDotNetLogic {
|
|
281
282
|
runTests: () => Promise<void>;
|
|
282
283
|
testWithNunitCli: DotNetTester;
|
|
283
284
|
testAsDotNetCore: DotNetTester;
|
|
284
285
|
shouldTestInParallel: (testProjectPaths: string[]) => Promise<boolean>;
|
|
286
|
+
logTestSuiteTimes: (results: ResultOrError[], styleFn: StyleFunction) => void;
|
|
285
287
|
testOneDotNetCoreProject: (
|
|
286
288
|
target: string,
|
|
287
289
|
configuration: string,
|