Esempio n. 1
0
    def test_cross_compiling(self):
        if snapcraft.ProjectOptions().deb_arch != 'amd64':
            self.skipTest('The test only handles amd64 to arm64')

        self.run_snapcraft(['build', '--target-arch=arm64'], 'autotools-hello')
        binary = os.path.join(self.parts_dir, 'make-project', 'install', 'bin',
                              'test')
        self.assertThat(binary, HasArchitecture('aarch64'))
Esempio n. 2
0
    def test_cross_compiling(self):
        if snapcraft.ProjectOptions().deb_arch != 'amd64':
            self.skipTest('The test only handles amd64 to arm64')

        self.run_snapcraft(['build', '--target-arch=arm64'],
                           'waf-with-configflags')
        binary = os.path.join(self.parts_dir, 'waf-project', 'install', 'usr',
                              'local', 'bin', 'myprogram')
        self.assertThat(binary, HasArchitecture('aarch64'))
Esempio n. 3
0
    def test_cross_compiling_with_cgo(self):
        if snapcraft.ProjectOptions().deb_arch != 'amd64':
            self.skipTest('The test only handles amd64 to arm64')

        target_arch = 'arm64'
        self.run_snapcraft(['build', '--target-arch={}'.format(target_arch)],
                           'go-cgo')
        binary = os.path.join(self.parts_dir, 'go-cgo', 'install', 'bin',
                              os.path.basename(self.path))
        self.assertThat(binary, HasArchitecture('aarch64'))