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

Enable code coverage for ant, maven and gradle #1728

Merged
merged 14 commits into from
May 18, 2016

Conversation

AshwiniChalla
Copy link
Contributor

Testing : unit tests, Manual testing. Ran all e2e tests against coreclr agent .

tr.setInput('javaHomeSelection', 'JDKVersion');
tr.setInput('jdkVersion', 'default');
tr.setInput('testResultsFiles', '**/TEST-*.xml');
tr.setInput('codeCoverageTool', 'Cobertura');
Copy link

Choose a reason for hiding this comment

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

indention

@@ -1,15 +1,18 @@
/// <reference path="../../definitions/vsts-task-lib.d.ts" />

import tl = require('vsts-task-lib/task');
Copy link

Choose a reason for hiding this comment

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

Copyright info

Copy link
Contributor Author

Choose a reason for hiding this comment

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

not needed

@nigurr
Copy link

nigurr commented May 17, 2016

specifiedJavaHome = jdkUserInputPath;

unnecessary var


Refers to: Tasks/ANT/anttask.ts:59 in 98457c8. [](commit_id = 98457c8, deletion_comment = False)

var sourceDirectories = tl.getInput('srcDirectories');
// appending with small guid to keep it unique. Avoiding full guid to ensure no long path issues.
var reportDirectoryName = "CCReport43F6D5EF";
reportDirectory = path.join(buildRootPath, reportDirectoryName);
Copy link

Choose a reason for hiding this comment

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

hardcoded directory names?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

explained offline

@nigurr
Copy link

nigurr commented May 17, 2016

import tl = require('vsts-task-lib/task');

Copyright


Refers to: Tasks/Gradle/gradletask.ts:3 in 98457c8. [](commit_id = 98457c8, deletion_comment = False)

@nigurr
Copy link

nigurr commented May 17, 2016

    "windows"

I guess We might need to remove this


Refers to: Tasks/Gradle/task.loc.json:193 in 98457c8. [](commit_id = 98457c8, deletion_comment = False)

@nigurr
Copy link

nigurr commented May 17, 2016

var testResultsFiles: string = tl.getInput('testResultsFiles', true);

This is clean. Get all inputs in the top and declare any global variables here


Refers to: Tasks/Maven/maventask.ts:12 in 98457c8. [](commit_id = 98457c8, deletion_comment = False)

},
"gradlew properties": {
"code": 0,
"stdout": "Something subprojects",
Copy link

@nigurr nigurr May 17, 2016

Choose a reason for hiding this comment

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

subprojects []

var reportPOMFile = null;
var execFileJacoco = null;
var ccReportTask = null;
enableCodeCoverage();
Copy link
Contributor

Choose a reason for hiding this comment

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

Can you add type information to the above vars?
var summaryFile: string = null;

}
}

function isFileExists(path: string) {
Copy link
Contributor

Choose a reason for hiding this comment

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

For clarity, this method should be named pathExistsAsFile().

@davidstaheli
Copy link
Contributor

Thank you for adding the L0 tests!

@AshwiniChalla AshwiniChalla merged commit 1f5d8cb into master May 18, 2016
@bryanmacfarlane bryanmacfarlane deleted the users/achalla/EnableCC branch October 20, 2016 02:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants