@iamsergio/qttest-utils 0.4.8 → 0.4.9

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/out/cmake.js CHANGED
@@ -18,6 +18,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.CMakeTest = exports.CMakeTests = void 0;
19
19
  const child_process_1 = require("child_process");
20
20
  const path_1 = __importDefault(require("path"));
21
+ const qttest_1 = require("./qttest");
21
22
  /**
22
23
  * Represents tests added in cmake (Via add_test())
23
24
  *
@@ -40,6 +41,7 @@ class CMakeTests {
40
41
  return undefined;
41
42
  }
42
43
  return new Promise((resolve, reject) => {
44
+ (0, qttest_1.logMessage)("Running ctest --show-only=json-v1 with cwd=" + this.buildDirPath);
43
45
  const child = (0, child_process_1.spawn)("ctest", ["--show-only=json-v1"], { "cwd": this.buildDirPath });
44
46
  let output = "";
45
47
  child.stdout.on("data", (chunk) => {
package/out/example.js CHANGED
@@ -54,6 +54,9 @@ function example() {
54
54
  if (slot.lastTestFailure) {
55
55
  console.log(" failed slot=" + slot.name + "; path=" + slot.lastTestFailure.filePath + "; line=" + slot.lastTestFailure.lineNumber);
56
56
  }
57
+ else {
58
+ console.log(" pass: " + slot.name);
59
+ }
57
60
  }
58
61
  }
59
62
  // Also run individual slots, just for example purposes:
package/out/qttest.d.ts CHANGED
@@ -1,4 +1,5 @@
1
1
  type LoggerFunction = (arg: string) => void;
2
+ export declare function logMessage(message: string): void;
2
3
  /**
3
4
  * Represents a single QtTest executable.
4
5
  * Supports listing the individual test slots
package/out/qttest.js CHANGED
@@ -38,7 +38,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
38
38
  return (mod && mod.__esModule) ? mod : { "default": mod };
39
39
  };
40
40
  Object.defineProperty(exports, "__esModule", { value: true });
41
- exports.QtTests = exports.QtTestSlot = exports.QtTest = void 0;
41
+ exports.QtTests = exports.QtTestSlot = exports.QtTest = exports.logMessage = void 0;
42
42
  const child_process_1 = require("child_process");
43
43
  const path_1 = __importDefault(require("path"));
44
44
  const fs = __importStar(require("fs"));
@@ -49,6 +49,7 @@ function logMessage(message) {
49
49
  gLogFunction(message);
50
50
  }
51
51
  }
52
+ exports.logMessage = logMessage;
52
53
  /**
53
54
  * Represents a single QtTest executable.
54
55
  * Supports listing the individual test slots
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iamsergio/qttest-utils",
3
- "version": "0.4.8",
3
+ "version": "0.4.9",
4
4
  "description": "API for listing QtTest executables from a build directory and which individual test slots each executable contains. Useful for a Text Explorer VSCode extension.",
5
5
  "repository": {
6
6
  "type": "git",