diff --git a/.cci.jenkinsfile b/.cci.jenkinsfile index 3336f8effd..b9a06c0eb1 100644 --- a/.cci.jenkinsfile +++ b/.cci.jenkinsfile @@ -7,6 +7,7 @@ def cpuCount_s = cpuCount.toString() def imageName = buildImage(env: [ENABLE_GO_RACE_DETECTOR: "1", GOMAXPROCS: cpuCount_s], cpu: cpuCount_s) def memory = (cpuCount * 1536) as Integer +parallel build: { pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memory}Mi") { checkout scm @@ -52,6 +53,7 @@ pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memo utils.cosaCmd(cosaDir: "/srv", args: "buildupload --dry-run s3 --acl=public-read my-nonexistent-bucket/my/prefix") } + // Random other tests that aren't about building. XXX: These should be part of `make // check` or something and use dummy cosa builds. stage("CLI Tests") { @@ -61,3 +63,12 @@ pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "${memo """) } } +}, selftests: { +pod(image: imageName + ":latest", kvm: true, cpu: "${cpuCount}", memory: "4096Mi") { + checkout scm + + stage("cosa run tests") { + shwrap("./tests/test-cosa-run.sh") + } +} +} diff --git a/tests/test-cosa-run.sh b/tests/test-cosa-run.sh new file mode 100755 index 0000000000..fef5a94c3e --- /dev/null +++ b/tests/test-cosa-run.sh @@ -0,0 +1,11 @@ +#!/bin/bash +# This verifies e.g. `cosa run`. +set -xeuo pipefail +tmpdir=$(mktemp -d -p /var/tmp) +cd ${tmpdir} +coreos-installer download -a s390x -p qemu -f qcow2.xz --decompress +cosa run --arch s390x *.qcow2 -x "cat /proc/cpuinfo" > cpuinfo.txt +grep -F 'IBM/S390' cpuinfo.txt +cd - +rm "${tmpdir}" -rf +echo "ok cosa run full emulation"