Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
Already on GitHub? Sign in to your account
Fix spread tests preventing Ubuntu 16.04 i386 from passing #197
Merged
Commits
Jump to file or symbol
Failed to load files and symbols.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
File renamed without changes.
Large diffs are not rendered by default.
Oops, something went wrong.
| @@ -0,0 +1,22 @@ | ||
| +#!/usr/bin/env python3 | ||
| +import os | ||
| +import sys | ||
| + | ||
| +def main(): | ||
| + kernel_arch = os.uname().machine | ||
| + # Because off by one bugs and naming ... | ||
| + snap_arch_map = { | ||
| + 'aarch64': 'arm64', | ||
| + 'armv7l': 'armhf', | ||
| + 'x86_64': 'amd64', | ||
| + 'i686': 'i386', | ||
| + } | ||
| + try: | ||
| + print(snap_arch_map[kernel_arch]) | ||
| + except KeyError: | ||
| + print("unsupported kernel architecture: {!a}".format(kernel_arch), file=sys.stderr) | ||
| + return 1 | ||
| + | ||
| + | ||
| +if __name__ == '__main__': | ||
| + main() |