wdio-test-ledger-service 9.2.6 → 9.2.8
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 +1 -1
- package/src/index.js +25 -5
package/package.json
CHANGED
package/src/index.js
CHANGED
|
@@ -46,7 +46,15 @@ class TestLedgerLauncher {
|
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
async onComplete(exit_code, config) {
|
|
49
|
-
|
|
49
|
+
let data = null;
|
|
50
|
+
try {
|
|
51
|
+
data = this.buildData(config);
|
|
52
|
+
}
|
|
53
|
+
catch(e) {
|
|
54
|
+
fs.writeFileSync(`${this.options.reporterOutputDir}/trio-builddata-error.txt`, e.message, { encoding : `utf-8` });
|
|
55
|
+
return;
|
|
56
|
+
}
|
|
57
|
+
|
|
50
58
|
|
|
51
59
|
try {
|
|
52
60
|
const response = await this.post(data);
|
|
@@ -111,14 +119,26 @@ class TestLedgerLauncher {
|
|
|
111
119
|
fs.writeFileSync(`${this.options.reporterOutputDir}/trio-readfile-error.txt`, e.message, { encoding : `utf-8` });
|
|
112
120
|
}
|
|
113
121
|
|
|
114
|
-
const
|
|
122
|
+
const match = file.match(/wdio-(\d+-\d+)-/);
|
|
123
|
+
if(!match) {
|
|
124
|
+
continue;
|
|
125
|
+
}
|
|
126
|
+
const identifier = match[1];
|
|
115
127
|
|
|
116
128
|
if(!tmp) {
|
|
117
129
|
continue;
|
|
118
130
|
}
|
|
119
131
|
|
|
120
|
-
|
|
121
|
-
|
|
132
|
+
let content;
|
|
133
|
+
try {
|
|
134
|
+
content = JSON.parse(tmp);
|
|
135
|
+
}
|
|
136
|
+
catch(e) {
|
|
137
|
+
fs.writeFileSync(`${this.options.reporterOutputDir}/trio-json-parse-error.txt`, `Failed to parse ${file}: ${e.message}`, { encoding : `utf-8` });
|
|
138
|
+
continue;
|
|
139
|
+
}
|
|
140
|
+
|
|
141
|
+
const suite_key = Buffer.from(`${identifier}:${content.spec_file}:${content.capabilities}:${content.title}`).toString('base64');
|
|
122
142
|
|
|
123
143
|
if(content.passed && Number(process.env.SKIP_PASSED_UPLOADS) === 1) {
|
|
124
144
|
continue;
|
|
@@ -140,7 +160,7 @@ class TestLedgerLauncher {
|
|
|
140
160
|
|
|
141
161
|
for(const test of content.tests) {
|
|
142
162
|
const hook = test.type === `hook`;
|
|
143
|
-
const test_key =
|
|
163
|
+
const test_key = Buffer.from(`${identifier}:${content.spec_file}:${content.capabilities}:${content.title}:${test.title}`).toString('base64');
|
|
144
164
|
|
|
145
165
|
if(!all_errors[test_key]) {
|
|
146
166
|
all_errors[test_key] = [];
|