From: Wei Liu <wei.liu2@citrix.com>
To: Xen-devel <xen-devel@lists.xenproject.org>
Cc: Wei Liu <wei.liu2@citrix.com>, Doug Goldstein <cardoe@cardoe.com>
Subject: [PATCH 4/4] automation: add qemu smoke test
Date: Mon, 19 Nov 2018 21:31:02 +0000 [thread overview]
Message-ID: <20181119213102.8939-5-wei.liu2@citrix.com> (raw)
In-Reply-To: <20181119213102.8939-1-wei.liu2@citrix.com>
This patch introduces a new test stage into the pipeline and provides
a simple QEMU based smoke test.
Signed-off-by: Wei Liu <wei.liu2@citrix.com>
---
.gitlab-ci.yml | 19 +++++++++++++++++++
automation/scripts/qemu-smoke-x86-64.sh | 23 +++++++++++++++++++++++
2 files changed, 42 insertions(+)
create mode 100755 automation/scripts/qemu-smoke-x86-64.sh
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index d11459b117..b9ccba6ab2 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -1,5 +1,6 @@
stages:
- build
+ - test
.build-tmpl: &build
stage: build
@@ -379,3 +380,21 @@ debian-unstable-gcc-debug-arm64-randconfig:
variables:
CONTAINER: debian:unstable-arm64v8
RANDCONFIG: y
+
+
+# Test jobs
+qemu-smoke-x86-64:
+ stage: test
+ image: registry.gitlab.com/xen-project/xen/${CONTAINER}
+ variables:
+ CONTAINER: debian:stretch
+ script:
+ - ./automation/scripts/qemu-smoke-x86-64.sh 2>&1 | tee qemu-smoke-x86-64.log
+ artifacts:
+ paths:
+ - smoke.serial
+ when: always
+ dependencies:
+ - debian-stretch-gcc-debug
+ tags:
+ - x86_64
diff --git a/automation/scripts/qemu-smoke-x86-64.sh b/automation/scripts/qemu-smoke-x86-64.sh
new file mode 100755
index 0000000000..7dc2c8542b
--- /dev/null
+++ b/automation/scripts/qemu-smoke-x86-64.sh
@@ -0,0 +1,23 @@
+#!/bin/bash
+
+set -ex
+
+# Install QEMU
+export DEBIAN_FRONTENT=noninteractive
+apt-get -qy update
+apt-get -qy install qemu-system-x86
+
+# Clone and build XTF
+git clone https://xenbits.xen.org/git-http/xtf.git
+cd xtf && make -j$(nproc) && cd -
+
+rm -f smoke.serial
+set +e
+timeout -k 1 10 \
+qemu-system-x86_64 -nographic -kernel binaries/xen \
+ -initrd xtf/tests/example/test-pv32pae-example \
+ -append 'loglvl=all com1=115200,,8n1 console=com1 noreboot' \
+ -m 512 -monitor none -serial file:smoke.serial
+set -e
+grep -q 'Test result: SUCCESS' smoke.serial || exit 1
+exit 0
--
2.11.0
_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xenproject.org
https://lists.xenproject.org/mailman/listinfo/xen-devel
next prev parent reply other threads:[~2018-11-19 21:31 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-11-19 21:30 [PATCH 0/4] automation: QEMU-based smoke test Wei Liu
2018-11-19 21:30 ` [PATCH 1/4] automation: introduce CONTAINER_NO_PULL for containerize Wei Liu
2018-11-20 16:35 ` Doug Goldstein
2018-11-19 21:31 ` [PATCH 2/4] automation: stash default config file for artifact extraction Wei Liu
2018-11-20 16:38 ` Doug Goldstein
2018-11-19 21:31 ` [PATCH 3/4] automation: also specify xen binary as artifact on x86_64 Wei Liu
2018-11-20 16:39 ` Doug Goldstein
2018-11-20 17:35 ` Andrew Cooper
2018-11-20 18:21 ` Wei Liu
2018-11-19 21:31 ` Wei Liu [this message]
2018-11-20 16:41 ` [PATCH 4/4] automation: add qemu smoke test Doug Goldstein
2018-11-20 16:47 ` Wei Liu
2018-11-19 21:40 ` [PATCH 0/4] automation: QEMU-based " Wei Liu
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20181119213102.8939-5-wei.liu2@citrix.com \
--to=wei.liu2@citrix.com \
--cc=cardoe@cardoe.com \
--cc=xen-devel@lists.xenproject.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).