summaryrefslogtreecommitdiff
path: root/yarns
diff options
context:
space:
mode:
Diffstat (limited to 'yarns')
-rw-r--r--yarns/implementations.yarn48
-rw-r--r--yarns/regression.yarn5
-rw-r--r--yarns/splitting.yarn18
3 files changed, 43 insertions, 28 deletions
diff --git a/yarns/implementations.yarn b/yarns/implementations.yarn
index d32bfd61..5b5b1724 100644
--- a/yarns/implementations.yarn
+++ b/yarns/implementations.yarn
@@ -87,17 +87,12 @@ another to hold a chunk.
chunks:
- name: test-chunk
repo: test:test-chunk
+ morph: test-chunk.morph
ref: master
- morph: test-chunk
build-mode: test
build-depends: []
EOF
- run_in "$DATADIR/gits/morphs" git init .
- run_in "$DATADIR/gits/morphs" git add .
- run_in "$DATADIR/gits/morphs" git commit -m Initial.
- run_in "$DATADIR/gits/morphs" git tag -a "test-tag" -m "Tagging test-tag"
-
# Create the chunk repository.
mkdir "$DATADIR/gits/test-chunk"
@@ -106,7 +101,7 @@ another to hold a chunk.
# dummy files in all the places that different kinds of files are
# usually installed. e.g. executables in `/bin` and `/usr/bin`
- install -m644 -D /dev/stdin << 'EOF' "$DATADIR/gits/test-chunk/test-chunk.morph"
+ install -m644 -D /dev/stdin << 'EOF' "$DATADIR/gits/morphs/test-chunk.morph"
name: test-chunk
kind: chunk
build-system: manual
@@ -161,7 +156,7 @@ another to hold a chunk.
# autotools configuration, they go into /libexec.
- |
- install -D /dev/null "$DESTDIR/$PREFIX/libexec/test-bin"
+ install -D test-bin "$DESTDIR/$PREFIX/libexec/test-bin"
# As well as run-time libraries, there's development files. For C
# this is headers, which describe the API of the libraries, which
@@ -174,7 +169,7 @@ another to hold a chunk.
# `-m` option.
- |
- install -D -m 644 /dev/null "$DESTDIR/$PREFIX/include/test.h"
+ install -D -m 644 test.h "$DESTDIR/$PREFIX/include/test.h"
# `pkg-config` is a standard way to locate libraries and get the
# compiler flags needed to build with the library. It's also used
@@ -184,7 +179,7 @@ another to hold a chunk.
- |
for pkgdir in lib lib32 lib64 share; do
- install -D -m 644 /dev/null \
+ install -D -m 644 test.pc \
"$DESTDIR/$PREFIX/$pkgdir/pkgconfig/test.pc"
done
@@ -240,9 +235,27 @@ another to hold a chunk.
done
EOF
+ run_in "$DATADIR/gits/morphs" git init .
+ run_in "$DATADIR/gits/morphs" git add .
+ run_in "$DATADIR/gits/morphs" git commit -m Initial.
+ run_in "$DATADIR/gits/morphs" git tag -a "test-tag" -m "Tagging test-tag"
+
run_in "$DATADIR/gits/test-chunk" git init .
+ cat > "$DATADIR/gits/test-chunk/test-bin" <<'EOF'
+ #!/bin/sh
+ echo Hello World
+ EOF
+ cat > "$DATADIR/gits/test-chunk/test.h" <<'EOF'
+ int foo(void);
+ EOF
+ cat > "$DATADIR/gits/test-chunk/test.pc" <<'EOF'
+ prefix=/usr
+ includedir=${prefix}/include
+ Name: test
+ Cflags: -I{includedir}
+ EOF
run_in "$DATADIR/gits/test-chunk" git add .
- run_in "$DATADIR/gits/test-chunk" git commit -m Initial.
+ run_in "$DATADIR/gits/test-chunk" git commit --allow-empty -m Initial.
# Create the Morph configuration file so we can access the repos
# using test:foo URL aliases.
@@ -263,15 +276,14 @@ have a morphology using the test architecture.
IMPLEMENTS GIVEN a system called (\S+) for the test architecture in the git server
- cat << EOF > "$DATADIR/gits/test-chunk/stage1-chunk.morph"
+ cat << EOF > "$DATADIR/gits/morphs/stage1-chunk.morph"
name: stage1-chunk
kind: chunk
build-system: dummy
EOF
- run_in "$DATADIR/gits/test-chunk" git init .
- run_in "$DATADIR/gits/test-chunk" git add .
- run_in "$DATADIR/gits/test-chunk" git commit -m Initial.
+ run_in "$DATADIR/gits/morphs" git add .
+ run_in "$DATADIR/gits/morphs" git commit -m "Add chunk for $MATCH_1"
install -m644 -D /dev/stdin << EOF "$DATADIR/gits/morphs/strata/build-essential.morph"
@@ -279,9 +291,9 @@ have a morphology using the test architecture.
kind: stratum
chunks:
- name: stage1-chunk
+ morph: stage1-chunk.morph
repo: test:test-chunk
ref: master
- morph: stage1-chunk
build-mode: bootstrap
build-depends: []
EOF
@@ -293,9 +305,9 @@ have a morphology using the test architecture.
- morph: strata/build-essential.morph
chunks:
- name: test-chunk
+ morph: test-chunk.morph
repo: test:test-chunk
ref: master
- morph: test-chunk
build-mode: test
build-depends: []
EOF
@@ -441,7 +453,7 @@ architecture as the machine doing the testing. This uses `morph
print-architecture` to get a value appropriate for morph.
IMPLEMENTS WHEN the user creates an uncommitted system morphology called (\S+) for our architecture in system branch (\S+)
- arch=$(morph print-architecture)
+ arch=$(run_morph print-architecture)
name="$(basename "${MATCH_1%.*}")"
install -m644 -D /dev/stdin << EOF "$DATADIR/workspace/$MATCH_2/test/morphs/$MATCH_1"
arch: $arch
diff --git a/yarns/regression.yarn b/yarns/regression.yarn
index 97e187f5..e5b3d875 100644
--- a/yarns/regression.yarn
+++ b/yarns/regression.yarn
@@ -88,12 +88,15 @@ Implementations
kind: stratum
chunks:
- name: bootstrap-chunk
+ morph: bootstrap-chunk.morph
repo: test:test-chunk
ref: master
- morph: test-chunk
build-mode: bootstrap
build-depends: []
EOF
+ sed -e 's/name: test-chunk/name: bootstrap-chunk/g' \
+ "$DATADIR/gits/morphs/test-chunk.morph" \
+ > "$DATADIR/gits/morphs/bootstrap-chunk.morph"
run_in "$DATADIR/gits/morphs" git add .
run_in "$DATADIR/gits/morphs" git commit -m "Add bootstrap-system"
diff --git a/yarns/splitting.yarn b/yarns/splitting.yarn
index dbe87a5c..1b67a881 100644
--- a/yarns/splitting.yarn
+++ b/yarns/splitting.yarn
@@ -90,7 +90,7 @@ Implementations
IMPLEMENTS GIVEN chunk (\S+) includes the default splitting rules
# Append default products rules
name="$(basename "${MATCH_1%.*}")"
- cat <<EOF >>"$DATADIR/gits/$name/$MATCH_1"
+ cat <<EOF >>"$DATADIR/gits/morphs/$MATCH_1"
products:
- artifact: $name-bins
include: [ "(usr/)?s?bin/.*" ]
@@ -117,8 +117,8 @@ Implementations
- artifact: $name-misc
include: [ .* ]
EOF
- run_in "$DATADIR/gits/$name" git add "$MATCH_1"
- run_in "$DATADIR/gits/$name" git commit -m 'Add default splitting rules'
+ run_in "$DATADIR/gits/morphs" git add "$MATCH_1"
+ run_in "$DATADIR/gits/morphs" git commit -m 'Add default splitting rules'
IMPLEMENTS GIVEN stratum (\S+) includes the default splitting rules
name=$(basename "${MATCH_1%.*}")
@@ -142,7 +142,7 @@ Implementations
- name: test-chunk
repo: test:test-chunk
ref: master
- morph: test-chunk
+ morph: test-chunk.morph
build-mode: test
build-depends: []
artifacts:
@@ -170,14 +170,14 @@ Implementations
IMPLEMENTS GIVEN stratum (\S+) has chunks that aren't used in (\S+)
# Create an extra chunk that will never successfully build
- cat >"$DATADIR/gits/test-chunk/unbuildable-chunk.morph" <<EOF
+ cat >"$DATADIR/gits/morphs/unbuildable-chunk.morph" <<EOF
name: unbuildable-chunk
kind: chunk
install-commands:
- "false"
EOF
- run_in "$DATADIR/gits/test-chunk" git add unbuildable-chunk.morph
- run_in "$DATADIR/gits/test-chunk" git commit -m 'Add unbuildable chunk'
+ run_in "$DATADIR/gits/morphs" git add unbuildable-chunk.morph
+ run_in "$DATADIR/gits/morphs" git commit -m 'Add unbuildable chunk'
# Create a stratum that has an artifact that doesn't include any
# artifacts from unbuildable-chunk
@@ -190,13 +190,13 @@ Implementations
- name: test-chunk
repo: test:test-chunk
ref: master
- morph: test-chunk
+ morph: test-chunk.morph
build-mode: test
build-depends: []
- name: unbuildable-chunk
repo: test:test-chunk
ref: refs/heads/master
- morph: unbuildable-chunk
+ morph: unbuildable-chunk.morph
build-mode: test
build-depends:
- test-chunk