diff options
Diffstat (limited to 'tests.build/setup-build-essential')
-rwxr-xr-x | tests.build/setup-build-essential | 20 |
1 files changed, 13 insertions, 7 deletions
diff --git a/tests.build/setup-build-essential b/tests.build/setup-build-essential index 281ff7ec..474c831c 100755 --- a/tests.build/setup-build-essential +++ b/tests.build/setup-build-essential @@ -17,6 +17,7 @@ # Set up a stratum which resembles Baserock's 'build-essential' slightly. Used # for testing 'morph cross-bootstrap' and the 'bootstrap' build mode. +# Add a mock compiler chunk. mkdir -p "$DATADIR/cc-repo" cd "$DATADIR/cc-repo" @@ -26,6 +27,12 @@ echo "I'm a compiler!" EOF chmod +x morph-test-cc +git init -q +git add morph-test-cc +git commit -q -m "Create compiler chunk" + +cd "$DATADIR/morphs-repo" + cat <<EOF > "stage1-cc.morph" name: stage1-cc kind: chunk @@ -43,15 +50,11 @@ install-commands: - install -d "\$DESTDIR\$PREFIX/bin" - install -m 755 morph-test-cc "\$DESTDIR\$PREFIX/bin/morph-test-cc" EOF - -git init -q -git add morph-test-cc cc.morph stage1-cc.morph -git commit -q -m "Create compiler chunk" +git add cc.morph stage1-cc.morph +git commit -q -m "Add build instructions for mock compiler." # Require 'cc' in hello-chunk. We should have the second version available # but *not* the first one. -cd "$DATADIR/chunk-repo" -git checkout -q farrokh cat <<EOF > "hello.morph" name: hello kind: chunk @@ -70,18 +73,20 @@ git commit -q -m "Make 'hello' require our mock compiler" # Add 'build-essential' stratum and make hello-stratum depend upon it. Only # the *second* 'cc' chunk should make it into the build-essential stratum # artifact, and neither should make it into the system. -cd "$DATADIR/morphs-repo" + cat <<EOF > "build-essential.morph" name: build-essential kind: stratum chunks: - name: stage1-cc + morph: stage1-cc.morph repo: test:cc-repo ref: master build-depends: [] build-mode: bootstrap prefix: /tools - name: cc + morph: cc.morph repo: test:cc-repo ref: master build-depends: @@ -96,6 +101,7 @@ build-depends: - morph: build-essential chunks: - name: hello + morph: hello.morph repo: test:chunk-repo ref: farrokh build-depends: [] |