-
Notifications
You must be signed in to change notification settings - Fork 17
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
GPII-2515: Add code coverage reporting... #94
Conversation
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
As with the similar universal PR, the tests will not pass here until the CI job is updated. As with that PR, I propose that we review, then update the CI job and confirm passing as a final step before merging. |
For those who are curious, here is a copy of the code coverage report I generated earlier today. |
… to add anchors to line numbers.
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
ok to test |
CI job failed. Please visit http://lists.gpii.net/pipermail/ci/ for more details. |
@the-t-in-rtf looks like there's a small typo in package.json (missing Could you also update the Fedora box to version 26 in the Vagrant file (or merge 'master')? |
CI job passed. |
Thanks, @gtirloni, good catch on the typo. I merged with master as well and confirmed working with the Fedora 26 box. |
This was mentioned in the architecture meeting on 8/9 and it's blocking other PRs (e.g. #95). I can revert the CI configuration if the review for this PR will take more time. |
@gtirloni, although it's nice to know this PR will eventually pass once the CI config is updated, it makes more sense to update the CI config after it's been reviewed, but before it's merged. That's what I was trying to propose earlier. I'd suggest reverting the CI config, we can discuss the timeline (and hopefully find someone to actually review this) in the meeting. |
This reverts commit c19067f. See GPII/linux#94 (comment)
Hi, @javihernandez. Just seeing if you have any bandwidth to look at this, it's just adding code coverage reporting to the linux repo. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hey @the-t-in-rtf, sorry for the long delay in reviewing this. I've been taking a look at it and, in general, it looks very good. Can you please update it according to the review in order to get rid of UnitTests.sh?
BTW, thanks for such improvement 👍
tests/UnitTests.sh
Outdated
pushd . | ||
cd ../gpii/node_modules/gsettingsBridge/tests | ||
cd gpii/node_modules/gsettingsBridge/tests | ||
# TODO: See if we can make this into a javascript-only approach | ||
./runUnitTests.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess that we will get rid of this shell script (UnitTests.sh) but it won't run after your refactoring of runUnitTests.sh.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As soon as I confirm the node_gsettings tests will run, I'll get rid of it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tests/UnitTests.sh
Outdated
./runUnitTests.sh | ||
# TODO: Produces no output when run on its own from the repo root. Investigate. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This won't produce any output unless there's an error as nodegsettings_tests.js uses the assert module. I'd say that these tests must be updated to use jqUnit so we can get the output even if they're not failing. In any case, you can just add it into UnitTests.js so it runs like the others and we can just get rid of this script. The side-effect of this is that we won't get the results of the rest of the tests when this one (nodegsettings_tests.js) fails until we refactor the tests to use jqUnit.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll rewrite the tests to use node-jqUnit, that seems too easy to not just take care of while I'm here.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
tests/UnitTests.js
Outdated
@@ -0,0 +1,9 @@ | |||
// Rollup to run all javascript-only unit tests. | |||
"use strict"; | |||
require("../gpii/node_modules/alsa/test/alsaSettingsHandlerTests.js"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good catch on the missing test. I searched to make sure I had the rest.
…s taken care of using npm scripts.
CI job failed: https://ci.gpii.net/job/linux-tests/114/ |
Thanks for the feedback, @javihernandez. I have updated the PR as suggested. I went ahead and converted the gsettings tests to use jqUnit. Following these changes, here is an example of the current coverage output. This should be ready for further review. |
@javihernandez, just to confirm, the idea is, once you're happy, we ask @gtirloni to update the CI config, confirm the builds pass, and merge. |
CI job failed: https://ci.gpii.net/job/linux-tests/115/ |
Hi, @javihernandez, as far as I can see, I addressed your feedback a while ago. Can you please take a look again? |
ok to test |
CI job failed: https://ci.gpii.net/job/linux-tests/125/ |
@javihernandez, this pull replaces the previous Grunt infrastructure, so the CI jobs will not work until the configuration is updated. As with similar pulls against other repos, we need to verify this using That's assuming we're still talking about the existing Jenkins jobs. If this is scheduled to be updated to use buildkite, we could test a new configuration as part of the pull. @avtar? |
Hi @the-t-in-rtf, right, I remembered that right after checking on the logs why this was failing on CI. 🤦♂️ I've just created a fresh vagrant box and I see that it's using node8/npm5, so I guess that we need to revert this situation until we find the right moment to do the switch (eventually, we can keep node 8 but we need to use an older version of npm). @gtirloni @amatas? |
For Linux, the desired npm version can be selected in the |
@the-t-in-rtf At the moment there aren't any plans for switching GPII projects to using Buildkite. That work was done for Infusion since PRs weren't being tested. |
Hi @the-t-in-rtf, I went through this one again and I had difficulties to run the acceptance tests after merging it with current linux/master. There is an underlying problem with the version of universal that you are introducing in this pr. Luckily, I updated the universal reference to point to current universal/master and it solved the issue. Can you update this pr:
Thanks again for your work on this 👍 |
Hi, @javihernandez. I pulled in the recent changes to linux (only the Vagrant config, looks like) and updated to the latest commit of universal. The tests and code coverage report now run as expected, here's an example of the output: https://the-t-in-rtf.github.io/coverage-reports/linux/20180215/ |
CI job failed: https://ci.gpii.net/job/linux-tests/137/ |
Just to confirm, this pull also migrates away from using grunt tasks, in favour of npm scripts. The CI builds will not work until we agree this is far enough along to update the config to simply run "npm test". |
Tested this PR manually with the newest version of the Fedora 27 box (20180330). Unit:
Acceptance:
14:46:46.153: jq: ***************
|
@javihernandez, as far as I can see all we need to do is agree to update the CI config and encourage everyone with an open pull to bring in these changes. I will bring it up at tomorrow's meeting. |
@the-t-in-rtf thanks for your work on this!
|
See GPII-2515 for details.