From patchwork Wed Mar 27 09:55:49 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Huth X-Patchwork-Id: 10873101 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 171AA1708 for ; Wed, 27 Mar 2019 09:56:02 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 01BE228C18 for ; Wed, 27 Mar 2019 09:56:02 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id EA0E828C21; Wed, 27 Mar 2019 09:56:01 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 6E4D228C18 for ; Wed, 27 Mar 2019 09:56:01 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1731920AbfC0J4A (ORCPT ); Wed, 27 Mar 2019 05:56:00 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41096 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725827AbfC0Jz7 (ORCPT ); Wed, 27 Mar 2019 05:55:59 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 8DE592D7F7; Wed, 27 Mar 2019 09:55:59 +0000 (UTC) Received: from thuth.com (ovpn-116-90.ams2.redhat.com [10.36.116.90]) by smtp.corp.redhat.com (Postfix) with ESMTP id BC76A5D6B3; Wed, 27 Mar 2019 09:55:52 +0000 (UTC) From: Thomas Huth To: Paolo Bonzini , =?utf-8?b?UmFkaW0gS3LEjW3DocWZ?= Cc: Drew Jones , Laurent Vivier , David Hildenbrand , Janosch Frank , kvm@vger.kernel.org Subject: [kvm-unit-tests PATCH v2] Add a .gitlab-ci.yml file for automatic CI testing on GitLab instances Date: Wed, 27 Mar 2019 10:55:49 +0100 Message-Id: <1553680549-25775-1-git-send-email-thuth@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 27 Mar 2019 09:55:59 +0000 (UTC) Sender: kvm-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: kvm@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP When changing common code of the kvm-unit-tests, one should make sure that the tests still compile fine for all target architectures afterwards. But compiling kvm-unit-tests for all target architectures manually is cumbersome. For people like me who store their git trees on GitLab, this can be done automatically via a CI system instead. Using the .gitlab-ci.yml file, auto- matic builds are now triggered on each push to a kvm-unit-test repository on gitlab.com. Additionally, the script also runs the tests that can be executed with QEMU TCG (except for s390x, since the QEMU package of the CI container currently does not provide the required s390-ccw bios here). Signed-off-by: Thomas Huth Acked-by: Andrew Jones --- v2: - Don't use the "--processor" option for configure (they are not required) - Add pmu and psci tests to the arm and aarch64 builds - Example can be seen here: https://gitlab.com/huth/kvm-unit-tests/pipelines/53825156 .gitlab-ci.yml | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..50a1e39 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,75 @@ +before_script: + - apt-get update -qq + - apt-get install -y -qq qemu-system + +build-aarch64: + script: + - apt-get install -y -qq gcc-aarch64-linux-gnu + - ./configure --arch=aarch64 --cross-prefix=aarch64-linux-gnu- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp + pci-test pmu gicv2-active gicv3-active psci timer + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-arm: + script: + - apt-get install -y -qq gcc-arm-linux-gnueabi + - ./configure --arch=arm --cross-prefix=arm-linux-gnueabi- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup selftest-vectors-kernel selftest-vectors-user selftest-smp + pci-test pmu gicv2-active gicv3-active psci + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-ppc64be: + script: + - apt-get install -y -qq gcc-powerpc64-linux-gnu + - ./configure --arch=ppc64 --endian=big --cross-prefix=powerpc64-linux-gnu- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base + rtas-set-time-of-day emulator + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-ppc64le: + script: + - apt-get install -y -qq gcc-powerpc64-linux-gnu + - ./configure --arch=ppc64 --endian=little --cross-prefix=powerpc64-linux-gnu- + - make -j2 + - ACCEL=tcg ./run_tests.sh + selftest-setup spapr_hcall rtas-get-time-of-day rtas-get-time-of-day-base + rtas-set-time-of-day emulator + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-s390x: + script: + - apt-get install -y -qq gcc-s390x-linux-gnu + - ./configure --arch=s390x --cross-prefix=s390x-linux-gnu- + - make -j2 + +build-x86_64: + script: + - ./configure --arch=x86_64 + - make -j2 + - ACCEL=tcg ./run_tests.sh + ioapic-split ioapic smptest smptest3 vmexit_cpuid vmexit_mov_from_cr8 + vmexit_mov_to_cr8 vmexit_inl_pmtimer vmexit_ipi vmexit_ipi_halt + vmexit_ple_round_robin vmexit_tscdeadline vmexit_tscdeadline_immed + eventinj msr port80 sieve tsc rmap_chain umip hyperv_stimer intel_iommu + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi + +build-i386: + script: + - apt-get install -y -qq gcc-multilib + - ./configure --arch=i386 + - make -j2 + - ACCEL=tcg ./run_tests.sh + eventinj port80 sieve tsc taskswitch umip hyperv_stimer + | tee results.txt + - if grep -q FAIL results.txt ; then exit 1 ; fi