summaryrefslogtreecommitdiff
path: root/tests.build/setup
diff options
context:
space:
mode:
Diffstat (limited to 'tests.build/setup')
-rwxr-xr-xtests.build/setup138
1 files changed, 0 insertions, 138 deletions
diff --git a/tests.build/setup b/tests.build/setup
deleted file mode 100755
index ca60d426..00000000
--- a/tests.build/setup
+++ /dev/null
@@ -1,138 +0,0 @@
-#!/bin/sh
-#
-# Create git repositories for tests. The chunk repository will contain a
-# simple "hello, world" C program, and two branches ("master", "farrokh"),
-# with the master branch containing just a README. The two branches are there
-# so that we can test building a branch that hasn't been checked out.
-# The branches are different so that we know that if the wrong branch
-# is uses, the build will fail.
-#
-# The stratum repository contains a single branch, "master", with a
-# stratum and a system morphology that include the chunk above.
-#
-# 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 <http://www.gnu.org/licenses/>.
-
-
-set -eu
-
-# The $DATADIR should be empty at the beginnig of each test.
-find "$DATADIR" -mindepth 1 -delete
-
-# Create chunk repository.
-
-chunkrepo="$DATADIR/chunk-repo"
-mkdir "$chunkrepo"
-cd "$chunkrepo"
-git init --quiet
-
-cat <<EOF > README
-This is a sample README.
-EOF
-git add README
-git commit --quiet -m "add README"
-
-git checkout --quiet -b farrokh
-
-cat <<EOF > hello.c
-#include <stdio.h>
-int main(void)
-{
- puts("hello, world");
- return 0;
-}
-EOF
-git add hello.c
-
-git commit --quiet -m "add a hello world program"
-git checkout --quiet master
-
-
-
-# Create morph repository.
-
-morphsrepo="$DATADIR/morphs-repo"
-mkdir "$morphsrepo"
-cd "$morphsrepo"
-git init --quiet
-
-echo 'version: 7' > VERSION
-git add VERSION
-
-cat <<'EOF' > DEFAULTS
-# This is a deliberately minimal DEFAULTS file.
-
-# There are no splitting rules defined, because it's important that Morph
-# still works correctly when the user didn't define any.
-
-build-systems:
- autotools:
- configure-commands:
- - ./configure
- build-commands:
- - make
- install-commands:
- - make DESTDIR="$DESTDIR" install
-EOF
-git add DEFAULTS
-
-cat <<EOF > hello.morph
-name: hello-chunk
-kind: chunk
-build-commands:
- - gcc -o hello hello.c
-install-commands:
- - install -d "\$DESTDIR"/etc
- - install -d "\$DESTDIR"/bin
- - install hello "\$DESTDIR"/bin/hello
-EOF
-git add hello.morph
-
-cat <<EOF > hello-stratum.morph
-name: hello-stratum
-kind: stratum
-chunks:
- - name: hello
- morph: hello.morph
- repo: test:chunk-repo
- ref: farrokh
- morph: hello.morph
- build-mode: test
- build-depends: []
-EOF
-git add hello-stratum.morph
-
-cat <<EOF > hello-system.morph
-name: hello-system
-kind: system
-arch: $("$SRCDIR/scripts/test-morph" print-architecture)
-strata:
- - morph: hello-stratum
-EOF
-git add hello-system.morph
-
-git commit --quiet -m "add morphs"
-
-
-# Create a morph configuration file.
-cat <<EOF > "$DATADIR/morph.conf"
-[config]
-repo-alias = test=file://$DATADIR/%s#file://$DATADIR/%s
-cachedir = $DATADIR/cache
-log = $DATADIR/morph.log
-tempdir = $TMPDIR
-no-distcc = true
-quiet = true
-EOF
-