From 68a377e18f9f80929504ba04c05baeff6ae1b383 Mon Sep 17 00:00:00 2001 From: Adam Coldrick Date: Tue, 3 Mar 2015 18:20:12 +0000 Subject: cmdtests: We can no longer meaningfully look at chunks in the cache Its much harder to look at the contents of the artifact cache now that they aren't stored by chunk name (just cache key and artifact suffix). All of these were failing because they were trying to extract chunk tarballs or locate and inspect artifacts, so just make sure the builds themselves don't fail. The build-system tests are a lot of work to make into yarns, as we'll need to build systems with actual tools in as far as I can tell. Also disable the cross-bootstrap test for now. --- tests.build/build-chunk-writes-log.script | 37 ------------------------ tests.build/build-stratum-with-submodules.script | 6 +--- tests.build/build-stratum-with-submodules.stdout | 3 -- tests.build/build-system-autotools.script | 5 ---- tests.build/build-system-autotools.stdout | 3 -- tests.build/build-system-cmake.script | 5 ---- tests.build/build-system-cmake.stdout | 2 -- tests.build/build-system-cpan.script | 5 ---- tests.build/build-system-cpan.stdout | 1 - tests.build/build-system-python-distutils.script | 10 ------- tests.build/build-system-python-distutils.stdout | 6 ---- tests.build/build-system-qmake.script | 8 ----- tests.build/build-system-qmake.stdout | 8 ----- tests.build/build-system.script | 26 ----------------- tests.build/build-system.stdout | 5 ---- tests.build/cross-bootstrap.script | 3 ++ tests.build/morphless-chunks.script | 5 ---- tests.build/morphless-chunks.stdout | 0 tests.build/prefix.script | 5 ---- tests.build/prefix.stdout | 8 ----- tests.build/rebuild-cached-stratum.script | 7 ----- tests.build/rebuild-cached-stratum.stdout | 22 -------------- 22 files changed, 4 insertions(+), 176 deletions(-) delete mode 100755 tests.build/build-chunk-writes-log.script delete mode 100644 tests.build/build-stratum-with-submodules.stdout delete mode 100644 tests.build/build-system-autotools.stdout delete mode 100644 tests.build/build-system-cmake.stdout delete mode 100644 tests.build/build-system-cpan.stdout delete mode 100644 tests.build/build-system-python-distutils.stdout delete mode 100644 tests.build/build-system-qmake.stdout delete mode 100755 tests.build/build-system.script delete mode 100644 tests.build/build-system.stdout delete mode 100644 tests.build/morphless-chunks.stdout delete mode 100644 tests.build/prefix.stdout delete mode 100644 tests.build/rebuild-cached-stratum.stdout diff --git a/tests.build/build-chunk-writes-log.script b/tests.build/build-chunk-writes-log.script deleted file mode 100755 index e636924e..00000000 --- a/tests.build/build-chunk-writes-log.script +++ /dev/null @@ -1,37 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2011-2013,2015 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . - - -## Build log should be saved when a chunk is built. - -set -eu - -"$SRCDIR/scripts/test-morph" build-morphology \ - test:morphs-repo master hello-system - -SOURCES="$DATADIR/cached-sources" -find "$DATADIR/cache/artifacts" -name '*.chunk.*' | - sed 's|\.chunk\..*||' | sort -u >"$SOURCES" - -found=false -# list of sources in cache is not piped because while loop changes variable -while read source; do - [ -e "$source".build-log ] || continue - found=true - break -done <"$SOURCES" -"$found" - diff --git a/tests.build/build-stratum-with-submodules.script b/tests.build/build-stratum-with-submodules.script index bd6b97ce..a2a1ddc9 100755 --- a/tests.build/build-stratum-with-submodules.script +++ b/tests.build/build-stratum-with-submodules.script @@ -56,11 +56,7 @@ EOF "$SRCDIR/scripts/run-git-in" "$morphs" commit --quiet -m 'foo' -# Now build and verify we got a stratum. +# Now build "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -system=$(ls "$DATADIR/cache/artifacts/"*hello-system-rootfs) -tar tf $system | LC_ALL=C sort | sed '/^\.\/./s:^\./::' | grep -v '^baserock/' - diff --git a/tests.build/build-stratum-with-submodules.stdout b/tests.build/build-stratum-with-submodules.stdout deleted file mode 100644 index d4d03e13..00000000 --- a/tests.build/build-stratum-with-submodules.stdout +++ /dev/null @@ -1,3 +0,0 @@ -./ -etc/ -etc/os-release diff --git a/tests.build/build-system-autotools.script b/tests.build/build-system-autotools.script index 710a8f98..936fa490 100755 --- a/tests.build/build-system-autotools.script +++ b/tests.build/build-system-autotools.script @@ -46,8 +46,3 @@ git commit --quiet -m "Convert hello to an autotools project" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -for chunk in "$DATADIR/cache/artifacts/"*.chunk.* -do - tar -tf "$chunk" -done | LC_ALL=C sort -u | sed '/^\.\/./s:^\./::' | grep -Ee '^(bin|etc)' diff --git a/tests.build/build-system-autotools.stdout b/tests.build/build-system-autotools.stdout deleted file mode 100644 index 683441c9..00000000 --- a/tests.build/build-system-autotools.stdout +++ /dev/null @@ -1,3 +0,0 @@ -bin/ -bin/hello -etc/ diff --git a/tests.build/build-system-cmake.script b/tests.build/build-system-cmake.script index fe02f9dc..b848aab9 100755 --- a/tests.build/build-system-cmake.script +++ b/tests.build/build-system-cmake.script @@ -48,8 +48,3 @@ git commit --quiet -m "Convert hello to a cmake project" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -for chunk in "$DATADIR/cache/artifacts/"*.chunk.* -do - tar -tf "$chunk" -done | LC_ALL=C sort -u | sed '/^\.\/./s:^\./::' | grep -Ee '^(usr/)?(bin|etc)' diff --git a/tests.build/build-system-cmake.stdout b/tests.build/build-system-cmake.stdout deleted file mode 100644 index 3410b113..00000000 --- a/tests.build/build-system-cmake.stdout +++ /dev/null @@ -1,2 +0,0 @@ -usr/bin/ -usr/bin/hello diff --git a/tests.build/build-system-cpan.script b/tests.build/build-system-cpan.script index 103d5466..b686de34 100755 --- a/tests.build/build-system-cpan.script +++ b/tests.build/build-system-cpan.script @@ -70,8 +70,3 @@ git commit -q -m "Set custom install prefix for hello" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -for chunk in "$DATADIR/cache/artifacts/"*.chunk.* -do - tar -tf "$chunk" -done | LC_ALL=C sort | sed '/^\.\/./s:^\./::' | grep -F 'bin/hello' diff --git a/tests.build/build-system-cpan.stdout b/tests.build/build-system-cpan.stdout deleted file mode 100644 index 180e949b..00000000 --- a/tests.build/build-system-cpan.stdout +++ /dev/null @@ -1 +0,0 @@ -bin/hello diff --git a/tests.build/build-system-python-distutils.script b/tests.build/build-system-python-distutils.script index e5c0ea74..d8210319 100755 --- a/tests.build/build-system-python-distutils.script +++ b/tests.build/build-system-python-distutils.script @@ -68,13 +68,3 @@ git commit -q -m "Set custom install prefix for hello" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -for chunk in "$DATADIR/cache/artifacts/"*.chunk.* -do - tar -tf "$chunk" -done | LC_ALL=C sort -u | sed '/^\.\/./s:^\./::' | grep -Ee '^(bin|lib)' | -sed -e 's:^local/::' \ - -e 's:lib/python2.[6-9]/:lib/python2.x/:' \ - -e 's:/hello-0\.0\.0[^/]*\.egg-info$:/hello.egg-info/:' \ - -e 's:[^/]*-packages:packages:' \ - -e '/^$/d' diff --git a/tests.build/build-system-python-distutils.stdout b/tests.build/build-system-python-distutils.stdout deleted file mode 100644 index 4d4c3a1e..00000000 --- a/tests.build/build-system-python-distutils.stdout +++ /dev/null @@ -1,6 +0,0 @@ -bin/ -bin/hello -lib/ -lib/python2.x/ -lib/python2.x/packages/ -lib/python2.x/packages/hello.egg-info/ diff --git a/tests.build/build-system-qmake.script b/tests.build/build-system-qmake.script index d430fba7..b477de4b 100755 --- a/tests.build/build-system-qmake.script +++ b/tests.build/build-system-qmake.script @@ -22,7 +22,6 @@ set -eu if ! command -v qmake > /dev/null ; then # There is no qmake, so skip this test. - cat "$SRCDIR/tests.build/build-system-qmake.stdout" exit 0 fi @@ -56,10 +55,3 @@ git commit --quiet -m "Convert hello to an qmake project" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -for chunk in "$DATADIR/cache/artifacts/"*.chunk.* -do - echo "$chunk:" | sed 's/[^.]*//' - tar -tf "$chunk" | LC_ALL=C sort | sed '/^\.\/./s:^\./::' - echo -done diff --git a/tests.build/build-system-qmake.stdout b/tests.build/build-system-qmake.stdout deleted file mode 100644 index ccf80a86..00000000 --- a/tests.build/build-system-qmake.stdout +++ /dev/null @@ -1,8 +0,0 @@ -.chunk.hello: -./ -baserock/ -baserock/hello.meta -usr/ -usr/bin/ -usr/bin/hello - diff --git a/tests.build/build-system.script b/tests.build/build-system.script deleted file mode 100755 index 0180939a..00000000 --- a/tests.build/build-system.script +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/sh -# -# Copyright (C) 2011-2015 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 -# the Free Software Foundation; version 2 of the License. -# -# This program is distributed in the hope that it will be useful, -# but WITHOUT ANY WARRANTY; without even the implied warranty of -# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -# GNU General Public License for more details. -# -# You should have received a copy of the GNU General Public License along -# with this program. If not, see . - - -## Test building a simple system. - -set -eu - -"$SRCDIR/scripts/test-morph" build-morphology \ - test:morphs-repo master hello-system - -system=$(ls "$DATADIR/cache/artifacts/"*hello-system-rootfs) -tar tf $system | LC_ALL=C sort | sed '/^\.\/./s:^\./::' | grep -v '^baserock/' diff --git a/tests.build/build-system.stdout b/tests.build/build-system.stdout deleted file mode 100644 index 4d0fac2f..00000000 --- a/tests.build/build-system.stdout +++ /dev/null @@ -1,5 +0,0 @@ -./ -bin/ -bin/hello -etc/ -etc/os-release diff --git a/tests.build/cross-bootstrap.script b/tests.build/cross-bootstrap.script index 245c2a13..6bab1659 100755 --- a/tests.build/cross-bootstrap.script +++ b/tests.build/cross-bootstrap.script @@ -22,6 +22,9 @@ set -eu "$SRCDIR/tests.build/setup-build-essential" +# cross-bootstrap needs rewriting for OSTree +exit 0 + "$SRCDIR/scripts/test-morph" cross-bootstrap \ $("$SRCDIR/scripts/test-morph" print-architecture) \ test:morphs-repo master hello-system diff --git a/tests.build/morphless-chunks.script b/tests.build/morphless-chunks.script index 5b19bc4a..b46fa635 100755 --- a/tests.build/morphless-chunks.script +++ b/tests.build/morphless-chunks.script @@ -40,8 +40,3 @@ git commit -q -m "Convert hello into an autodetectable chunk" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -for chunk in "$DATADIR/cache/artifacts/"*.chunk.* -do - tar -tf "$chunk" -done | cat >/dev/null # No files get installed apart from metadata diff --git a/tests.build/morphless-chunks.stdout b/tests.build/morphless-chunks.stdout deleted file mode 100644 index e69de29b..00000000 diff --git a/tests.build/prefix.script b/tests.build/prefix.script index 140617e1..75c91200 100755 --- a/tests.build/prefix.script +++ b/tests.build/prefix.script @@ -65,8 +65,3 @@ git commit -q -m "Update stratum" "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo master hello-system - -cd "$DATADIR/cache/artifacts" -first_chunk=$(ls -1 *.chunk.xyzzy-* | head -n1 | cut -c -64) -second_chunk=$(ls -1 *.chunk.plugh-* | head -n1 | cut -c -64) -cat $first_chunk.build-log $second_chunk.build-log diff --git a/tests.build/prefix.stdout b/tests.build/prefix.stdout deleted file mode 100644 index 80c18fae..00000000 --- a/tests.build/prefix.stdout +++ /dev/null @@ -1,8 +0,0 @@ -# configure -# # echo First chunk: prefix $PREFIX -First chunk: prefix /plover -# configure -# # echo Second chunk: prefix $PREFIX -Second chunk: prefix /usr -# # echo Path: $(echo $PATH | grep -o '/plover') -Path: /plover diff --git a/tests.build/rebuild-cached-stratum.script b/tests.build/rebuild-cached-stratum.script index e2e0face..bdbe193d 100755 --- a/tests.build/rebuild-cached-stratum.script +++ b/tests.build/rebuild-cached-stratum.script @@ -40,9 +40,6 @@ cache="$DATADIR/cache/artifacts" # Build the first time. "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo rebuild-cached-stratum hello-system -echo "first build:" -(cd "$cache" && ls *.chunk.* *hello-stratum-* | sed 's/^[^.]*\./ /' | - LC_ALL=C sort -u) # Change the chunk. (cd "$DATADIR/chunk-repo" && @@ -52,7 +49,3 @@ echo "first build:" # Rebuild. "$SRCDIR/scripts/test-morph" build-morphology \ test:morphs-repo rebuild-cached-stratum hello-system -echo "second build:" -(cd "$cache" && ls *.chunk.* *hello-stratum-* | sed 's/^[^.]*\./ /' | - LC_ALL=C sort -u) - diff --git a/tests.build/rebuild-cached-stratum.stdout b/tests.build/rebuild-cached-stratum.stdout deleted file mode 100644 index 9c53ee60..00000000 --- a/tests.build/rebuild-cached-stratum.stdout +++ /dev/null @@ -1,22 +0,0 @@ -first build: - chunk.hello-bins - chunk.hello-devel - chunk.hello-doc - chunk.hello-libs - chunk.hello-locale - chunk.hello-misc - stratum.hello-stratum-devel - stratum.hello-stratum-devel.meta - stratum.hello-stratum-runtime - stratum.hello-stratum-runtime.meta -second build: - chunk.hello-bins - chunk.hello-devel - chunk.hello-doc - chunk.hello-libs - chunk.hello-locale - chunk.hello-misc - stratum.hello-stratum-devel - stratum.hello-stratum-devel.meta - stratum.hello-stratum-runtime - stratum.hello-stratum-runtime.meta -- cgit v1.2.1