Skip to content
This repository has been archived by the owner on Aug 14, 2020. It is now read-only.

Commit

Permalink
When in SPM mode catch error when a test fail, and continue uploading…
Browse files Browse the repository at this point in the history
… symbols and code path data
  • Loading branch information
Ignacio Bonafonte committed Jan 28, 2020
1 parent 44b357e commit 1db5c06
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 2 deletions.
11 changes: 10 additions & 1 deletion dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -1195,8 +1195,17 @@ async function swiftPackageRun(extraParameters, codePathEnabled, agentVersion) {
" -Xswiftc -framework -Xswiftc ScopeAgent -Xlinker -rpath -Xlinker " +
scopeMacFrameworkPath +
extraParameters;
const resultTest = await exec.exec(buildTestCommand, null, null);

let testError;
try {
await exec.exec(buildTestCommand, null, null);
} catch (error) {
testError = error.message;
}

if (testError) {
core.setFailed(testError.message);
}
// Upload symbols
let runScriptCommand =
"sh -c " + scopeDir + scopeMacFrameworkToolsPath + "upload_symbols";
Expand Down
11 changes: 10 additions & 1 deletion index.js
Original file line number Diff line number Diff line change
Expand Up @@ -254,8 +254,17 @@ async function swiftPackageRun(extraParameters, codePathEnabled, agentVersion) {
" -Xswiftc -framework -Xswiftc ScopeAgent -Xlinker -rpath -Xlinker " +
scopeMacFrameworkPath +
extraParameters;
const resultTest = await exec.exec(buildTestCommand, null, null);

let testError;
try {
await exec.exec(buildTestCommand, null, null);
} catch (error) {
testError = error.message;
}

if (testError) {
core.setFailed(testError.message);
}
// Upload symbols
let runScriptCommand =
"sh -c " + scopeDir + scopeMacFrameworkToolsPath + "upload_symbols";
Expand Down

0 comments on commit 1db5c06

Please sign in to comment.