Join GitHub today
GitHub is home to over 20 million developers working together to host and review code, manage projects, and build software together.
Let Rust plugin fetch dependencies in pull #908
Conversation
|
Thanks for the PR, seems the unit tests need updating though.
Also might as well run
Before pushing again. Thanks again |
|
It looks like the tests failed because travis couldn't update packages? |
elopio
requested changes
Nov 16, 2016
Thanks @ChrisMacNaughton
I think it would be nice to add an integration test with a simple rust project that has dependencies.
You can take a look at integration_tests/test_rust_plugin.py
| @@ -86,7 +86,7 @@ def test_pull(self, run_mock, script_mock): | ||
| plugin.pull() | ||
| - self.assertEqual(1, run_mock.call_count) | ||
| + self.assertEqual(2, run_mock.call_count) |
elopio
Nov 16, 2016
Member
This test would require more than checking that rust was called twice. Please take a look at the next statement that checks the arguments of the first call, and do something similar to the second.
| + 'build-essential', | ||
| + 'git', | ||
| + 'curl', | ||
| + 'file', |
elopio
Nov 16, 2016
Member
I don't know rust, so I will trust you here that these are needed. But just curious, is there a doc that mentions these requirements?
ChrisMacNaughton
Nov 16, 2016
Contributor
These are the things that were required for me to get rustc installed on one of the launchpad builders. Can't find specific documentation about it but that's where this list came from.
ChrisMacNaughton
added some commits
Nov 16, 2016
|
@elopio tests should be accurate now, and the integration rust project now pulls in a dependency |
| @@ -54,6 +54,12 @@ def schema(cls): | ||
| def __init__(self, name, options, project): | ||
| super().__init__(name, options, project) | ||
| + self.build_packages.extend([ | ||
| + 'build-essential', |
| @@ -54,6 +54,12 @@ def schema(cls): | ||
| def __init__(self, name, options, project): | ||
| super().__init__(name, options, project) | ||
| + self.build_packages.extend([ | ||
| + 'build-essential', | ||
| + 'git', |
kyrofa
Nov 22, 2016
Member
Git should be pulled in simply by using a git source. It shouldn't be required here.
kyrofa
Nov 22, 2016
Member
Unless the pull of rust eventually turns into a git clone. Is that the case?
ChrisMacNaughton
Nov 22, 2016
Contributor
Pulling Rust shouldn't clone, but using Cargo for the build can
ChrisMacNaughton
added some commits
Nov 22, 2016
sergiusens
requested changes
Nov 24, 2016
Thanks for this great functionality improvement on separating pull and build effectively in the plugin. I do however need to ask you to revert the change on the wiki downloader test as master has a proper (air quotes) fix for this (at least one where the endpoint won't change underneath us).
| @@ -27,7 +27,8 @@ def test_downloader_with_wiki_parts(self): | ||
| snap_path = self.build_snap(self.snap_content_dir) | ||
| self.install_snap(snap_path, 'downloader', '1.0') | ||
| expected = ( | ||
| - '.*<title>The leading OS for PC, tablet, phone and cloud ' | ||
| + '.*<title>The leading operating system for PCs, tablets, ' |
sergiusens
Nov 24, 2016
Collaborator
This should be reverted as it was fixed in master with a more permanent solution.
|
@sergiusens I've reverted that change, and it looks like that is the issue with the autopkgtests still. |
ChrisMacNaughton
and others
added some commits
Dec 1, 2016
codecov-io
commented
Dec 6, 2016
Current coverage is 97.06% (diff: 100%)@@ master #908 diff @@
==========================================
Files 161 161
Lines 16600 16603 +3
Methods 0 0
Messages 0 0
Branches 1244 1244
==========================================
+ Hits 16113 16116 +3
Misses 302 302
Partials 185 185
|
ChrisMacNaughton commentedNov 16, 2016
Pulling the dependencies in the pull stage allows
building Rust snaps on Launchpad builders,
which are offline during the build stage