summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Maw <richard.maw@codethink.co.uk>2014-03-10 10:25:03 +0000
committerRichard Maw <richard.maw@codethink.co.uk>2014-03-14 10:54:55 +0000
commitf366960273b026322f7e7cc3c1eb0cd632ebc73e (patch)
tree51449f8ad44217e8ad922158e47512bb4fb57ff0
parent8592fe5681fb131f05434d208133bbc82f8109e1 (diff)
downloadmorph-f366960273b026322f7e7cc3c1eb0cd632ebc73e.tar.gz
tests: Allow running ./check on 32-bit x86
uname will return the same string morph expects as an architecture on x86_64, but the canonical x86_32 architecture names match i?86 instead. To make it work on 32-bit, we replace calls to uname with morph print-architecture, which does the translation for us.
-rwxr-xr-xtests.as-root/metadata-includes-morph-version.setup2
-rwxr-xr-xtests.as-root/metadata-includes-repo-alias.setup2
-rwxr-xr-xtests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script4
-rw-r--r--tests.as-root/run-in-artifact-with-different-artifacts.stderr2
-rwxr-xr-xtests.as-root/setup4
-rwxr-xr-xtests.as-root/system-overlap.script2
-rwxr-xr-xtests.as-root/tarball-image-is-sensible.setup2
-rwxr-xr-xtests.branching/setup2
-rw-r--r--tests.branching/tag-creates-commit-and-tag.stdout6
-rw-r--r--tests.branching/tag-tag-works-as-expected.stdout6
-rw-r--r--tests.build/bootstrap-mode.stdout6
-rwxr-xr-xtests.build/setup2
-rwxr-xr-xtests.deploy/setup4
-rwxr-xr-xtests.merging/setup4
-rwxr-xr-xtests/show-dependencies.setup2
-rw-r--r--yarns/deployment.yarn2
16 files changed, 26 insertions, 26 deletions
diff --git a/tests.as-root/metadata-includes-morph-version.setup b/tests.as-root/metadata-includes-morph-version.setup
index 31829b01..d7fc96e3 100755
--- a/tests.as-root/metadata-includes-morph-version.setup
+++ b/tests.as-root/metadata-includes-morph-version.setup
@@ -27,7 +27,7 @@ cat <<EOF > hello-tarball.morph
{
"name": "hello-tarball",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "hello-stratum",
diff --git a/tests.as-root/metadata-includes-repo-alias.setup b/tests.as-root/metadata-includes-repo-alias.setup
index 31829b01..d7fc96e3 100755
--- a/tests.as-root/metadata-includes-repo-alias.setup
+++ b/tests.as-root/metadata-includes-repo-alias.setup
@@ -27,7 +27,7 @@ cat <<EOF > hello-tarball.morph
{
"name": "hello-tarball",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "hello-stratum",
diff --git a/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script b/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script
index 93cd135f..e0829968 100755
--- a/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script
+++ b/tests.as-root/rootfs-tarball-builds-rootfs-and-kernel.script
@@ -1,6 +1,6 @@
#!/bin/sh
#
-# Copyright (C) 2011, 2012, 2013 Codethink Limited
+# Copyright (C) 2011, 2012, 2013, 2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -23,7 +23,7 @@ set -eu
cache="$DATADIR/cache/artifacts"
-arch=$(uname -m)
+arch=$("$SRCDIR/scripts/test-morph" print-architecture)
cd "$DATADIR/kernel-repo"
cat <<EOF >linux.morph
diff --git a/tests.as-root/run-in-artifact-with-different-artifacts.stderr b/tests.as-root/run-in-artifact-with-different-artifacts.stderr
index 9241fbb5..3995cc42 100644
--- a/tests.as-root/run-in-artifact-with-different-artifacts.stderr
+++ b/tests.as-root/run-in-artifact-with-different-artifacts.stderr
@@ -1 +1 @@
-ERROR: Artifact TMP/cache/artifacts/e8e771e742c8f2199bd9f1e29cbeca07dbd51dd8880136d6521093711d37d8bf.stratum.linux-stratum-runtime cannot be extracted or mounted
+ERROR: Artifact TMP/cache/artifacts/b6c123860d8b1b84a39490b5ded7b792219be89bae3e09201bd10795ac509a21.stratum.linux-stratum-runtime cannot be extracted or mounted
diff --git a/tests.as-root/setup b/tests.as-root/setup
index b865f42d..1cf9dd04 100755
--- a/tests.as-root/setup
+++ b/tests.as-root/setup
@@ -132,7 +132,7 @@ git add tools-stratum.morph
cat <<EOF > hello-system.morph
name: hello-system
kind: system
-arch: `uname -m`
+arch: `"$SRCDIR/scripts/test-morph" print-architecture`
strata:
- morph: hello-stratum
EOF
@@ -155,7 +155,7 @@ git add linux-stratum.morph
cat <<EOF > linux-system.morph
name: linux-system
kind: system
-arch: `uname -m`
+arch: `"$SRCDIR/scripts/test-morph" print-architecture`
strata:
- morph: hello-stratum
- morph: linux-stratum
diff --git a/tests.as-root/system-overlap.script b/tests.as-root/system-overlap.script
index c6154e0e..1ce8379d 100755
--- a/tests.as-root/system-overlap.script
+++ b/tests.as-root/system-overlap.script
@@ -31,7 +31,7 @@ cat <<EOF >overlap-system.morph
{
"name": "overlap-system",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "foo-baz-stratum",
diff --git a/tests.as-root/tarball-image-is-sensible.setup b/tests.as-root/tarball-image-is-sensible.setup
index 505707b3..c47a5336 100755
--- a/tests.as-root/tarball-image-is-sensible.setup
+++ b/tests.as-root/tarball-image-is-sensible.setup
@@ -46,7 +46,7 @@ cat <<EOF > hello-tarball.morph
{
"name": "hello-tarball",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "link-stratum",
diff --git a/tests.branching/setup b/tests.branching/setup
index 06a05e90..22c51c24 100755
--- a/tests.branching/setup
+++ b/tests.branching/setup
@@ -50,7 +50,7 @@ ln -s "$DATADIR/morphs" "$DATADIR/morphs.git"
cat <<EOF > "$DATADIR/morphs/hello-system.morph"
name: hello-system
kind: system
-arch: $(uname -m)
+arch: $("$SRCDIR/scripts/test-morph" print-architecture)
strata:
- morph: hello-stratum
EOF
diff --git a/tests.branching/tag-creates-commit-and-tag.stdout b/tests.branching/tag-creates-commit-and-tag.stdout
index 335e6a31..0e885652 100644
--- a/tests.branching/tag-creates-commit-and-tag.stdout
+++ b/tests.branching/tag-creates-commit-and-tag.stdout
@@ -5,7 +5,7 @@ Date: Tue Jul 31 16:51:54 2012 +0000
Message
-commit 74b7fcdd21ac4756e473eb8a577caaabeab208b0
+commit eb4ad9eb2e04ef131c774c79dd4391aea57b7b4d
Author: developer <developer@example.com>
Date: Tue Jul 31 16:51:54 2012 +0000
@@ -26,7 +26,7 @@ index e012b5f..50da61b 100644
build-mode: test
test:morphs
-commit 74b7fcdd21ac4756e473eb8a577caaabeab208b0
+commit eb4ad9eb2e04ef131c774c79dd4391aea57b7b4d
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
@@ -34,7 +34,7 @@ CommitDate: Tue Jul 31 16:51:54 2012 +0000
Message
-commit dc323150575be26e3df0d2dab678560c04281b9f
+commit 2a240d0170183a94869bd30a9112d11715627e4c
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
diff --git a/tests.branching/tag-tag-works-as-expected.stdout b/tests.branching/tag-tag-works-as-expected.stdout
index c3d723d7..d2eec589 100644
--- a/tests.branching/tag-tag-works-as-expected.stdout
+++ b/tests.branching/tag-tag-works-as-expected.stdout
@@ -9,7 +9,7 @@ Date: Tue Jul 31 16:51:54 2012 +0000
Second
-commit ed4fa3a98076e92d61983202ed44455b3689bc16
+commit 589936e1097412e612ca3843be5f0a9f77a08077
Author: developer <developer@example.com>
Date: Tue Jul 31 16:51:54 2012 +0000
@@ -30,7 +30,7 @@ index e012b5f..50da61b 100644
build-mode: test
test:morphs
-commit ed4fa3a98076e92d61983202ed44455b3689bc16
+commit 589936e1097412e612ca3843be5f0a9f77a08077
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
@@ -38,7 +38,7 @@ CommitDate: Tue Jul 31 16:51:54 2012 +0000
Second
-commit dc323150575be26e3df0d2dab678560c04281b9f
+commit 2a240d0170183a94869bd30a9112d11715627e4c
Author: developer <developer@example.com>
AuthorDate: Tue Jul 31 16:51:54 2012 +0000
Commit: developer <developer@example.com>
diff --git a/tests.build/bootstrap-mode.stdout b/tests.build/bootstrap-mode.stdout
index 26544a75..083dd09d 100644
--- a/tests.build/bootstrap-mode.stdout
+++ b/tests.build/bootstrap-mode.stdout
@@ -1,8 +1,8 @@
build-essential strata:
-./2271bef9cb222b1fd49bd2bcf3da435e02b4e0ce9fdddbcdf9358f608f51b547.stratum.build-essential-devel
-["xxxx.chunk.cc-devel", "xxxx.chunk.cc-doc"]
-./2a908a170acf10b4e9e131a007c8f3f0fa4961a7227c60793b3550c107f4c312.stratum.build-essential-runtime
+./b75013d0859b014c0315da32d8b678efe7f781af458ea40e6d16854f2dbcd23e.stratum.build-essential-runtime
["xxxx.chunk.cc-bins", "xxxx.chunk.cc-libs", "xxxx.chunk.cc-locale", "xxxx.chunk.cc-misc"]
+./c63086da61edde5bb6141a7100862e24bbcb47be7692bc1176883fa5e18d5503.stratum.build-essential-devel
+["xxxx.chunk.cc-devel", "xxxx.chunk.cc-doc"]
hello-system:
./
diff --git a/tests.build/setup b/tests.build/setup
index 8b1dfd0e..559825b1 100755
--- a/tests.build/setup
+++ b/tests.build/setup
@@ -107,7 +107,7 @@ cat <<EOF > hello-system.morph
{
"name": "hello-system",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "hello-stratum",
diff --git a/tests.deploy/setup b/tests.deploy/setup
index 5fbe0262..ece8819a 100755
--- a/tests.deploy/setup
+++ b/tests.deploy/setup
@@ -112,7 +112,7 @@ cat <<EOF > hello-system.morph
{
"name": "hello-system",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "hello-stratum",
@@ -148,7 +148,7 @@ cat <<EOF > linux-system.morph
{
"name": "linux-system",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "hello-stratum",
diff --git a/tests.merging/setup b/tests.merging/setup
index 2fdf9db0..77b8bebc 100755
--- a/tests.merging/setup
+++ b/tests.merging/setup
@@ -1,5 +1,5 @@
#!/bin/bash
-# Copyright (C) 2012-2013 Codethink Limited
+# Copyright (C) 2012-2014 Codethink Limited
#
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
@@ -51,7 +51,7 @@ cat <<EOF > "$DATADIR/morphs/hello-system.morph"
{
"name": "hello-system",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"morph": "hello-stratum",
diff --git a/tests/show-dependencies.setup b/tests/show-dependencies.setup
index e1cc71ae..510656e6 100755
--- a/tests/show-dependencies.setup
+++ b/tests/show-dependencies.setup
@@ -347,7 +347,7 @@ cat <<EOF > xfce-system.morph
{
"name": "xfce-system",
"kind": "system",
- "arch": "$(uname -m)",
+ "arch": "$("$SRCDIR/scripts/test-morph" print-architecture)",
"strata": [
{
"build-mode": "test",
diff --git a/yarns/deployment.yarn b/yarns/deployment.yarn
index a5da8ee5..88fd47a9 100644
--- a/yarns/deployment.yarn
+++ b/yarns/deployment.yarn
@@ -54,7 +54,7 @@ the same code paths as a real upgrade.
AND system test-system in cluster test-cluster in branch master has deployment type: rawdisk
AND system test-system in cluster test-cluster in branch master has deployment location: test.tar
WHEN the user builds the system test-system in branch master
- AND the user attempts to deploy the cluster test-cluster in branch master with options test-system.DISK_SIZE=10M test-system.VERSION_LABEL=test1
+ AND the user attempts to deploy the cluster test-cluster in branch master with options test-system.DISK_SIZE=100M test-system.VERSION_LABEL=test1
THEN morph succeeded
WHEN the user attempts to upgrade the cluster test-cluster in branch master with options test-system.VERSION_LABEL=test2
THEN morph succeeded