summaryrefslogtreecommitdiff
path: root/morphlib/cachekeycomputer_tests.py
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-13 16:24:59 +0000
committerSam Thursfield <sam.thursfield@codethink.co.uk>2013-03-15 11:04:55 +0000
commitf1cdf64cd5fa4271403286271ead511989ce15a1 (patch)
tree4b02dc53e10770da9aca05fb6e166bf020a55e26 /morphlib/cachekeycomputer_tests.py
parent89c0777fa1c8918f8402b64484b16b6c715c441b (diff)
downloadmorph-f1cdf64cd5fa4271403286271ead511989ce15a1.tar.gz
One 'arch' to rule them all
Define a specific set of 4 architectures that Morph supports, and only expose that value to morphologies. Since GNU triplets are very common we also expose a GNU triplet. Other morphologies should work out their configuration based on MORPH_ARCH. This commit also removes the morphlib.util.arch() function, which detected the machine Morph is running on via 'uname -m'. Morph's architecture names do not necessarily map to the output of 'uname -m' so we should not rely on it anywhere.
Diffstat (limited to 'morphlib/cachekeycomputer_tests.py')
-rw-r--r--morphlib/cachekeycomputer_tests.py7
1 files changed, 3 insertions, 4 deletions
diff --git a/morphlib/cachekeycomputer_tests.py b/morphlib/cachekeycomputer_tests.py
index ec4c9d22..2f033a7a 100644
--- a/morphlib/cachekeycomputer_tests.py
+++ b/morphlib/cachekeycomputer_tests.py
@@ -25,8 +25,7 @@ class DummyBuildEnvironment:
settings to pick the environment, it just gets passed
a dict representing it
'''
- def __init__(self, env, arch=None):
- self.arch = morphlib.util.arch() if arch is None else arch
+ def __init__(self, env, arch):
self.env = env
@@ -105,11 +104,11 @@ class CacheKeyComputerTests(unittest.TestCase):
m.builds_artifacts = [m['name']]
self.build_env = DummyBuildEnvironment({
"LOGNAME": "foouser",
+ "MORPH_ARCH": "dummy",
"TARGET": "dummy-baserock-linux-gnu",
"TARGET_STAGE1": "dummy-baserock-linux-gnu",
- "TARGET_GCC_CONFIG": "",
"USER": "foouser",
- "USERNAME": "foouser"})
+ "USERNAME": "foouser"}, 'dummy')
self.artifact_resolver = morphlib.artifactresolver.ArtifactResolver()
self.artifacts = self.artifact_resolver.resolve_artifacts(
self.source_pool)