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

go plugin: Add support for cross-compilation #1338

Merged
merged 8 commits into from Jun 2, 2017

Conversation

@kalikiana
Copy link
Contributor

kalikiana commented Jun 1, 2017

Support doing snapcraft snap --target-arch= with parts using the go plugin

@kalikiana kalikiana requested a review from elopio Jun 1, 2017
@kalikiana kalikiana self-assigned this Jun 1, 2017
@kalikiana kalikiana added this to the 2.31 milestone Jun 1, 2017
Copy link
Contributor

elopio left a comment

a few small details to change from the team review.

if snapcraft.ProjectOptions().deb_arch != 'amd64':
self.skipTest('The test only handles amd64 to armhf')

expected_arch = 'arm64'

This comment has been minimized.

@elopio

elopio Jun 1, 2017 Contributor

rename to target_arch, please.

os.path.basename(self.path))
arch = subprocess.check_output(['file', '-b', binary],
universal_newlines=True)
self.assertThat(arch, Contains('aarch64'))

This comment has been minimized.

@elopio

elopio Jun 1, 2017 Contributor

Kyle and Sergio think that this will be better as a matcher in this branch.

'go-hello')
binary = os.path.join(self.parts_dir, 'go-hello', 'install', 'bin',
os.path.basename(self.path))
arch = subprocess.check_output(['file', '-b', binary],

This comment has been minimized.

@elopio

elopio Jun 1, 2017 Contributor

use python magic instead of file.


patcher = mock.patch('sys.stdout')
patcher.start()
self.addCleanup(patcher.stop)

This comment has been minimized.

@elopio

elopio Jun 1, 2017 Contributor

This shouldn't be needed, it's done by the base test case.

@elopio
elopio approved these changes Jun 1, 2017
Copy link
Contributor

elopio left a comment

thank you @kalikiana !

@sergiusens sergiusens modified the milestones: 2.31, 2.30.1 Jun 1, 2017
@sergiusens sergiusens merged commit a167ec4 into snapcore:master Jun 2, 2017
1 check passed
1 check passed
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

3 participants
You can’t perform that action at this time.