Skip to content

Commit 3d5071f

Browse files
committed
ci: Test full-emulation cosa run
We should have some CI that verifies this works.
1 parent 5cf1cfd commit 3d5071f

File tree

2 files changed

+22
-0
lines changed

2 files changed

+22
-0
lines changed

Diff for: .cci.jenkinsfile

+11
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ def cpuCount_s = cpuCount.toString()
77
def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1", GOMAXPROCS: cpuCount_s], cpu: cpuCount_s)
88

99
def memory = (cpuCount * 1536) as Integer
10+
parallel build: {
1011
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") {
1112
checkout scm
1213

@@ -52,6 +53,7 @@ pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memo
5253
utils.cosaCmd(cosaDir: "/srv", args: "buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix")
5354
}
5455

56+
5557
// Random other tests that aren't about building. XXX: These should be part of `make
5658
// check` or something and use dummy cosa builds.
5759
stage("CLI Tests") {
@@ -61,3 +63,12 @@ pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memo
6163
""")
6264
}
6365
}
66+
}, selftests: {
67+
pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "4096Mi") {
68+
checkout scm
69+
70+
stage("cosa run tests") {
71+
shwrap("./tests/test-cosa-run.sh")
72+
}
73+
}
74+
}

Diff for: tests/test-cosa-run.sh

+11
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
#!/bin/bash
2+
# This verifies e.g. `cosa run`.
3+
set -xeuo pipefail
4+
tmpdir=$(mktemp -d -p /var/tmp)
5+
cd ${tmpdir}
6+
coreos-installer download -a s390x -p qemu -f qcow2.xz --decompress
7+
cosa run --arch s390x *.qcow2 -x "cat /proc/cpuinfo" > cpuinfo.txt
8+
grep -F 'IBM/S390' cpuinfo.txt
9+
cd -
10+
rm "${tmpdir}" -rf
11+
echo "ok cosa run full emulation"

0 commit comments

Comments
 (0)