Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ensuring upload of logs doesnt fail the task #6452

Merged
merged 1 commit into from
Feb 16, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion Tasks/VsTest/task.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 2,
"Minor": 3,
"Patch": 23
"Patch": 24
},
"demands": [
"vstest"
Expand Down
2 changes: 1 addition & 1 deletion Tasks/VsTest/task.loc.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"version": {
"Major": 2,
"Minor": 3,
"Patch": 23
"Patch": 24
},
"demands": [
"vstest"
Expand Down
28 changes: 17 additions & 11 deletions Tasks/VsTest/vstest.ts
Original file line number Diff line number Diff line change
Expand Up @@ -402,19 +402,25 @@ function uploadVstestDiagFile(): void {
}

function uploadFile(file: string): void {
if (utils.Helper.pathExistsAsFile(file)) {
const stats = fs.statSync(file);
tl.debug('File exists. Size: ' + stats.size + ' Bytes');
console.log('##vso[task.uploadfile]' + file);

const files = tl.findMatch(os.tmpdir(), ['*host.*.txt', '*datacollector.*.txt']);
if (files) {
files.forEach(file => {
tl.debug('Uploading file: ' + file);
console.log('##vso[task.uploadfile]' + file);
});
try {
if (utils.Helper.pathExistsAsFile(file)) {
const stats = fs.statSync(file);
tl.debug('File exists. Size: ' + stats.size + ' Bytes');
console.log('##vso[task.uploadfile]' + file);

const files = tl.findMatch(os.tmpdir(), ['*host.*.txt', '*datacollector.*.txt']);
if (files) {
files.forEach(file => {
tl.debug('Uploading file: ' + file);
console.log('##vso[task.uploadfile]' + file);
});
}
}
}
catch (err) {
utils.Helper.publishEventToCi(AreaCodes.GETVSTESTTESTSLIST, err.message, 1029, false);
tl.debug(err);
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

warning?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we should not show that to user

}
}

function discoverTestFromFilteredFilter(vsVersion: number, testCaseFilterFile: string, testCaseFilterOutput: string): string {
Expand Down