1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
"regression" tests
==================
Tests for check we don't introduce some bugs again.
Testing if we can build after checking out from a tag.
SCENARIO morph build works after checkout from a tag
GIVEN a workspace
AND a git server
WHEN the user checks out the system tag called test-tag
THEN morph build the system test-system of the tag test-tag
Running `morph branch` when the branch directory exists doesn't
remove the existing directory.
SCENARIO re-running 'morph branch' fails, original branch untouched
GIVEN a workspace
AND a git server
WHEN the user creates a system branch called foo
THEN the system branch foo is checked out
The branch is checked out correctly, now it should fail if the user executes
`morph branch` with the same branch name.
WHEN the user attempts to create a system branch called foo
THEN morph failed
AND the branch error message includes the string "File exists"
The branch still checked out.
AND the system branch foo is checked out
It doesn't make much sense to be able to build a system with only
bootstrap chunks, since they will have been constructed without a staging
area, hence their results cannot be trusted.
SCENARIO building a system with only bootstrap chunks fails
GIVEN a workspace
AND a git server
AND a system containing only bootstrap chunks called bootstrap-system
WHEN the user checks out the system branch called master
AND the user attempts to build the system bootstrap-system in branch master
THEN the build error message includes the string "No non-bootstrap chunks found"
When we started allowing multiple artifacts, a long-standing bug in
cache-key computation was discovered, it didn't include artifact names,
which would cause a collision if a morphology changed which artifacts
from a source it depended on, but not the number of artifacts from that
source it depended on.
SCENARIO changing the artifacts a system uses
GIVEN a workspace
AND a git server
AND system test-system uses test-stratum-runtime from test-stratum
AND stratum test-stratum has match rules: [{artifact: test-stratum-runtime, include: [.*-(bins|libs|locale)]}, {artifact: test-stratum-devel, include: [.*-(devel|doc|misc)]}]
WHEN the user checks out the system branch called master
GIVEN a cluster called test-cluster for deploying only the test-system system as type tar in system branch master
WHEN the user builds the system test-system in branch master
GIVEN stratum test-stratum in system branch master has match rules: [{artifact: test-stratum-runtime, include: [.*-(bins|libs|misc)]}, {artifact: test-stratum-devel, include: [.*-(devel|doc|locale)]}]
WHEN the user builds the system test-system in branch master
AND the user deploys the cluster test-cluster in branch master with options test-system.location="$DATADIR/test.tar"
THEN tarball test.tar contains baserock/test-chunk-misc.meta
Implementations
---------------
IMPLEMENTS GIVEN a system containing only bootstrap chunks called (\S+)
arch=$(run_morph print-architecture)
cat <<EOF >"$DATADIR/gits/morphs/$MATCH_1.morph"
name: $MATCH_1
kind: system
arch: $arch
strata:
- morph: bootstrap-stratum
EOF
cat << EOF > "$DATADIR/gits/morphs/bootstrap-stratum.morph"
name: bootstrap-stratum
kind: stratum
chunks:
- name: bootstrap-chunk
repo: test:test-chunk
ref: master
morph: test-chunk
build-mode: bootstrap
build-depends: []
EOF
run_in "$DATADIR/gits/morphs" git add .
run_in "$DATADIR/gits/morphs" git commit -m "Add bootstrap-system"
|