From d1b40f5b50941f617937d010da6e5fadcd782630 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Mon, 11 Mar 2013 13:45:34 +0000 Subject: Change test to also verify that artifact is not compressed --- tests.as-root/tarball-image-is-sensible.script | 7 +++++++ tests.as-root/tarball-image-is-sensible.stderr | 1 + 2 files changed, 8 insertions(+) create mode 100644 tests.as-root/tarball-image-is-sensible.stderr (limited to 'tests.as-root') diff --git a/tests.as-root/tarball-image-is-sensible.script b/tests.as-root/tarball-image-is-sensible.script index 1b4d60ae..e36cdb5a 100755 --- a/tests.as-root/tarball-image-is-sensible.script +++ b/tests.as-root/tarball-image-is-sensible.script @@ -29,6 +29,13 @@ set -eu tar=$("$SRCDIR/scripts/test-morph" --find-system-artifact \ build-morphology test:morphs tarball-links hello-tarball) +# Verify that the tar archive is not compressed. +if gunzip -t "$tar" > /dev/null +then + echo "ERROR: $tar is gzip'd!" 1>&2 + exit 1 +fi + extracted="$DATADIR/extracted" mkdir -p "$extracted" cd "$extracted" diff --git a/tests.as-root/tarball-image-is-sensible.stderr b/tests.as-root/tarball-image-is-sensible.stderr new file mode 100644 index 00000000..9db65e02 --- /dev/null +++ b/tests.as-root/tarball-image-is-sensible.stderr @@ -0,0 +1 @@ +gunzip: invalid magic -- cgit v1.2.1 From b7f69986034afef8a792839fac601caa0f20d55a Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Mon, 28 Jan 2013 14:57:39 +0000 Subject: Remove features used by old bootstrap method That means that bootstrapping Baserock is currently not possible with this branch of Morph, but there's no reason it cannot be bootstrapped using an older version of Morph instead. --- tests.as-root/setup | 1 - 1 file changed, 1 deletion(-) (limited to 'tests.as-root') diff --git a/tests.as-root/setup b/tests.as-root/setup index 03a438e0..a85507e0 100755 --- a/tests.as-root/setup +++ b/tests.as-root/setup @@ -200,7 +200,6 @@ cat < "$DATADIR/morph.conf" repo-alias = test=file://$DATADIR/#file://$DATADIR/ cachedir = $DATADIR/cache log = $DATADIR/morph.log -keep-path = true no-distcc = true quiet = true log = /tmp/morph.log -- cgit v1.2.1 From 84807d4d7c23f45d4f0a0f87e6c7ba7ba7470936 Mon Sep 17 00:00:00 2001 From: Sam Thursfield Date: Wed, 6 Feb 2013 10:23:57 +0000 Subject: Add 'build-mode' field for chunks in a stratum Allowed values: staging: build with a staging chroot (default) test: build with the host's tools bootstrap: build with the host's tools, and do not include this chunk in the final stratum artifact In the past, 'normal mode' has been used to describe building a chunk with the host's tools. We don't want that mode to ever be used, because it is a huge hole in reproducability, but we need to keep it around to avoid making Morph's cmdtest suite depend on Baserock. Hopefully naming it 'test' should discourage potential abusers. It is unfortunate that the build tests now take a separate code path compared to real-world usage of Morph. However, this is necessary to avoid a circular dependency between Morph's test suite and the build-essential stratum in Baserock. We do whole-build testing of Baserock, too, so the 'staging' code path is still tested outside of Morph. However, testing a staging area requires populating it with at minimum a working shell, and this is a bit too complex to go in Morph's test suite. --- tests.as-root/build-with-external-strata.script | 1 + tests.as-root/setup | 3 +++ tests.as-root/system-overlap.script | 6 +++++- tests.as-root/tarball-image-is-sensible.setup | 1 + 4 files changed, 10 insertions(+), 1 deletion(-) (limited to 'tests.as-root') diff --git a/tests.as-root/build-with-external-strata.script b/tests.as-root/build-with-external-strata.script index 2d5d0fed..fd021399 100755 --- a/tests.as-root/build-with-external-strata.script +++ b/tests.as-root/build-with-external-strata.script @@ -38,6 +38,7 @@ cat <> stratum2.morph "name": "linux", "repo": "test:kernel-repo", "ref": "master", + "build-mode": "test", "build-depends": [] } ] diff --git a/tests.as-root/setup b/tests.as-root/setup index a85507e0..b9d5d477 100755 --- a/tests.as-root/setup +++ b/tests.as-root/setup @@ -110,6 +110,7 @@ chunks: - name: hello repo: test:chunk-repo ref: farrokh + build-mode: test build-depends: [] EOF git add hello-stratum.morph @@ -125,6 +126,7 @@ chunks: - name: tools repo: test:tools-repo ref: master + build-mode: test build-depends: [] EOF git add tools-stratum.morph @@ -153,6 +155,7 @@ chunks: - name: linux repo: test:kernel-repo ref: master + build-mode: test build-depends: [] EOF git add linux-stratum.morph diff --git a/tests.as-root/system-overlap.script b/tests.as-root/system-overlap.script index cc308536..b8888491 100755 --- a/tests.as-root/system-overlap.script +++ b/tests.as-root/system-overlap.script @@ -1,6 +1,6 @@ #!/bin/sh # -# Copyright (C) 2011, 2012 Codethink Limited +# Copyright (C) 2011-2013 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 @@ -57,12 +57,14 @@ cat <foo-baz-stratum.morph "name": "overlap-foo-baz", "repo": "test:chunk-repo", "ref": "overlap", + "build-mode": "test", "build-depends": [] }, { "name": "linux", "repo": "test:kernel-repo", "ref": "master", + "build-mode": "test", "build-depends": ["overlap-foo-baz"] } ] @@ -77,12 +79,14 @@ cat <foo-barqux-stratum.morph "name": "overlap-foobar", "repo": "test:chunk-repo", "ref": "overlap", + "build-mode": "test", "build-depends": [] }, { "name": "overlap-fooqux", "repo": "test:chunk-repo", "ref": "overlap", + "build-mode": "test", "build-depends": ["overlap-foobar"] } ] diff --git a/tests.as-root/tarball-image-is-sensible.setup b/tests.as-root/tarball-image-is-sensible.setup index e159070c..fa904c2c 100755 --- a/tests.as-root/tarball-image-is-sensible.setup +++ b/tests.as-root/tarball-image-is-sensible.setup @@ -84,6 +84,7 @@ cat < link-stratum.morph "name": "links", "repo": "test:chunk-repo", "ref": "tarball-links", + "build-mode": "test", "build-depends": [] } ] -- cgit v1.2.1