@iamsergio/qttest-utils 0.3.0 → 0.3.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/package.json +2 -2
- package/src/qttest.ts +6 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@iamsergio/qttest-utils",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.1",
|
|
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
|
"scripts": {
|
|
6
6
|
"build": "tsc"
|
|
@@ -19,4 +19,4 @@
|
|
|
19
19
|
"ts-node": "^10.9.1",
|
|
20
20
|
"typescript": "^4.9.5"
|
|
21
21
|
}
|
|
22
|
-
}
|
|
22
|
+
}
|
package/src/qttest.ts
CHANGED
|
@@ -32,6 +32,7 @@ export class QtTest {
|
|
|
32
32
|
public async parseAvailableSlots(): Promise<void> {
|
|
33
33
|
let slotNames: string[] = [];
|
|
34
34
|
let output = "";
|
|
35
|
+
let err = "";
|
|
35
36
|
|
|
36
37
|
await new Promise((resolve, reject) => {
|
|
37
38
|
const child = spawn(this.filename, ["-functions"]);
|
|
@@ -40,6 +41,10 @@ export class QtTest {
|
|
|
40
41
|
output += chunk.toString();
|
|
41
42
|
});
|
|
42
43
|
|
|
44
|
+
child.stderr.on("data", (chunk) => {
|
|
45
|
+
err += chunk.toString();
|
|
46
|
+
});
|
|
47
|
+
|
|
43
48
|
child.on("exit", (code) => {
|
|
44
49
|
if (code === 0) {
|
|
45
50
|
slotNames = slotNames.concat(output.split("\n"));
|
|
@@ -56,7 +61,7 @@ export class QtTest {
|
|
|
56
61
|
|
|
57
62
|
resolve(slotNames);
|
|
58
63
|
} else {
|
|
59
|
-
reject(new Error("Failed to run -functions"));
|
|
64
|
+
reject(new Error("Failed to run -functions, stdout=" + output + "; stderr=" + err + "; code=" + code));
|
|
60
65
|
}
|
|
61
66
|
});
|
|
62
67
|
});
|