From nobody Wed May 1 05:37:04 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) client-ip=209.132.183.28; envelope-from=libvir-list-bounces@redhat.com; helo=mx1.redhat.com; Authentication-Results: mx.zoho.com; dkim=fail spf=pass (zoho.com: domain of redhat.com designates 209.132.183.28 as permitted sender) smtp.mailfrom=libvir-list-bounces@redhat.com; Return-Path: Received: from mx1.redhat.com (mx1.redhat.com [209.132.183.28]) by mx.zohomail.com with SMTPS id 1496250247235802.2709811746488; Wed, 31 May 2017 10:04:07 -0700 (PDT) Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.phx2.redhat.com [10.5.11.14]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 72F42C059741; Wed, 31 May 2017 17:04:03 +0000 (UTC) Received: from colo-mx.corp.redhat.com (colo-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.20]) by smtp.corp.redhat.com (Postfix) with ESMTPS id DD7F917D7E; Wed, 31 May 2017 17:04:02 +0000 (UTC) Received: from lists01.pubmisc.prod.ext.phx2.redhat.com (lists01.pubmisc.prod.ext.phx2.redhat.com [10.5.19.33]) by colo-mx.corp.redhat.com (Postfix) with ESMTP id 37E0F180BAF5; Wed, 31 May 2017 17:04:01 +0000 (UTC) Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.phx2.redhat.com [10.5.11.15]) by lists01.pubmisc.prod.ext.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id v4VH40U5007237 for ; Wed, 31 May 2017 13:04:00 -0400 Received: by smtp.corp.redhat.com (Postfix) id 58DF1176AB; Wed, 31 May 2017 17:04:00 +0000 (UTC) Received: from mx1.redhat.com (ext-mx06.extmail.prod.ext.phx2.redhat.com [10.5.110.30]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 52EBEEFB8C for ; Wed, 31 May 2017 17:03:58 +0000 (UTC) Received: from mail-qk0-f176.google.com (mail-qk0-f176.google.com [209.85.220.176]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D829A51C for ; Wed, 31 May 2017 17:03:56 +0000 (UTC) Received: by mail-qk0-f176.google.com with SMTP id y201so16936463qka.0 for ; Wed, 31 May 2017 10:03:56 -0700 (PDT) Received: from localhost.localdomain ([189.103.224.91]) by smtp.gmail.com with ESMTPSA id v17sm10944604qtv.24.2017.05.31.10.03.51 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 31 May 2017 10:03:55 -0700 (PDT) DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com 72F42C059741 Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx08.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=libvir-list-bounces@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com 72F42C059741 Authentication-Results: mx1.redhat.com; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="sm6JwNZw" DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com D829A51C Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: ext-mx06.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=claudioandre.br@gmail.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com D829A51C DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QIngFe9wl0fu5LyDG51iKrCCAz/OgdEMMAi6ANPNna4=; b=sm6JwNZwM+jcJ1l6Usisjf8bMZerS3Ll1RyllaGDXQg2f1x6obLrOjCTB0qmZBbv3Q MPD1ZSDC0R8OfwG6nm/EG/IEKswZIgI49gl7Yw4KuIm3S0mSEzIdB7yLv8E7jIVETb/a 25/9ZOq/hWrXzyyjidy2i+wuennCFPL2z07JRFVbkia0DC1xGyAO59yip/vywh7pl5fa L911Tky6eHax7LIIqISZnoH7/ntYSrqFVaVbs3Oa3AQJ4uzEXqaxOEQVz8FlEVMe/XH1 UW9KYNIJMGMQI7/ge5bxV4xEaXMfSIwNNeTad0NV6C9eLChxT+OojtkrR+NVM1v2dDEP 2Aeg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=QIngFe9wl0fu5LyDG51iKrCCAz/OgdEMMAi6ANPNna4=; b=jb55/OJIQCFsmLJ0gEaW9d7ESEo2OwSZMcrU0rVKrznv9VQBVEdJfZqXRTJpB9Ak22 LXZPg6sAGFleyc+wiF4RcbmIJzP+A659eBvMN5mPsZus4L95S4in2oR84pNixf0TdXhv LW8UdboNZMM7fws4sbv3fwgvGNEW3iXLfJZiRAiInKMFAQfQ4WRshUGC8IZYv+8oz/JK JeC7PG3K72wFcxRAmRTA1WQeD3BISrjEmeks2Ep6IJja2DsWnja7VlJjFn/JHSJuODMs sAQpLAwJ9bZa2HNP8MbGVds0zvXuacKtJ2sECRGu6Vh0YhXpFRhYb/j6/14yxmpjNLb6 rSpQ== X-Gm-Message-State: AODbwcD8UVPkd0GlyuJAtVmk4KB4+GvjbatGYVd1gLligNarRptPZD0Y Kew6tiKU/BFwadpm X-Received: by 10.55.38.199 with SMTP id m68mr30791914qkm.152.1496250235929; Wed, 31 May 2017 10:03:55 -0700 (PDT) From: claudioandre.br@gmail.com To: libvir-list@redhat.com Date: Wed, 31 May 2017 14:01:57 -0300 Message-Id: <20170531170157.20317-1-claudioandre.br@gmail.com> MIME-Version: 1.0 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 31 May 2017 17:03:57 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.30]); Wed, 31 May 2017 17:03:57 +0000 (UTC) for IP:'209.85.220.176' DOMAIN:'mail-qk0-f176.google.com' HELO:'mail-qk0-f176.google.com' FROM:'claudioandre.br@gmail.com' RCPT:'' X-RedHat-Spam-Score: -0.51 (BAYES_50, DCC_REPUT_00_12, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_NONE, RCVD_IN_MSPIKE_H2, RCVD_IN_SORBS_SPAM, RCVD_IN_SORBS_WEB, SPF_PASS) 209.85.220.176 mail-qk0-f176.google.com 209.85.220.176 mail-qk0-f176.google.com X-Scanned-By: MIMEDefang 2.78 on 10.5.110.30 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.15 X-loop: libvir-list@redhat.com Cc: =?UTF-8?q?Claudio=20Andr=C3=A9?= Subject: [libvirt] [PATCH V3] CI: also run tests using updated distro(s) X-BeenThere: libvir-list@redhat.com X-Mailman-Version: 2.1.12 Precedence: junk List-Id: Development discussions about the libvirt library & tools List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Sender: libvir-list-bounces@redhat.com Errors-To: libvir-list-bounces@redhat.com X-Scanned-By: MIMEDefang 2.79 on 10.5.11.14 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.32]); Wed, 31 May 2017 17:04:04 +0000 (UTC) X-ZohoMail-DKIM: fail (Header signature does not verify) X-ZohoMail: RDKM_2 RSF_0 Z_629925259 SPT_0 From: Claudio Andr=C3=A9 It is possible to test libvirt using other distros in Travis via Docker; including (but not limited to) Fedora and Ubuntu. --- https://travis-ci.org/claudioandre/libvirt/builds/237995646 .travis.yml | 19 ++++++------- tests/travis-ci.sh | 80 ++++++++++++++++++++++++++++++++++++++++++++++++++= ++++ 2 files changed, 89 insertions(+), 10 deletions(-) create mode 100755 tests/travis-ci.sh diff --git a/.travis.yml b/.travis.yml index 5a3e765..e4d4888 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,8 +1,6 @@ sudo: false language: c dist: precise -compiler: - - gcc cache: ccache addons: apt: @@ -62,15 +60,14 @@ git: before_install: - if [ "$TRAVIS_OS_NAME" =3D=3D "osx" ]; then brew update && brew instal= l gnutls libgcrypt yajl gettext rpcgen ; fi =20 -# the custom PATH is just to pick up OS-X homebrew & its harmless on Linux -before_script: - - PATH=3D"/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH" ./= autogen.sh script: - - VIR_TEST_DEBUG=3D1 make -j3 && make -j3 syntax-check && make -j3 check + - tests/travis-ci.sh =20 # Environments here are run in addition to the main environment defined ab= ove matrix: include: + - compiler: gcc + dist: precise - compiler: clang dist: precise - compiler: clang @@ -79,10 +76,12 @@ matrix: dist: trusty - compiler: clang os: osx - script: - # many unit tests fail & so does syntax-check, so skip for now - # one day we must fix it though.... - - make -j3 + - services: docker + env: IMAGE=3Dubuntu:17.04 CC=3Dgcc + dist: trusty + - services: docker + env: IMAGE=3Dubuntu:17.04 CC=3Dclang + dist: trusty =20 after_failure: - echo '=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D' diff --git a/tests/travis-ci.sh b/tests/travis-ci.sh new file mode 100755 index 0000000..e63d509 --- /dev/null +++ b/tests/travis-ci.sh @@ -0,0 +1,80 @@ +#!/bin/bash -e + +function do_Install_Dependencies(){ + echo + echo '-- Installing Dependencies --' + + if [[ $DISTRO =3D "ubuntu:17.04" ]]; then + apt-get update -qq + apt-get -y -qq install \ + build-essential git clang autoconf libtool libcmpicppimpl0 get= text \ + xsltproc autopoint libxml2-dev libncurses5-dev libreadline-dev= \ + zlib1g-dev libgnutls28-dev libgcrypt11-dev libavahi-client-dev= libsasl2-dev \ + libxen-dev lvm2 libgcrypt11-dev libparted0-dev libdevmapper-de= v uuid-dev \ + libudev-dev libpciaccess-dev libcap-ng-dev libnl-3-dev libnl-r= oute-3-dev \ + libyajl-dev libpcap0.8-dev libnuma-dev libnetcf-dev libaudit-d= ev \ + libxml2-utils libapparmor-dev dnsmasq-base librbd-dev w3c-mark= up-validator kmod > /dev/null + else + echo "Please, change 'tests/travis-ci.sh' to add the needed depend= encies for $DISTRO." + exit 1 + fi +} + + +function do_Show_Info(){ + echo + echo '-- Environment --' + echo "Running on Docker: $DISTRO" + id + uname -a + + if [[ -n $CC ]]; then + echo + echo '-- Compiler in use --' + "$CC" --version + fi + + echo -en 'travis_fold:start:printenv\r' + echo '-- Environment Variables --' + printenv + echo -en 'travis_fold:end:printenv\r' +} + + +# ----------- Build and Test libvirt ----------- + +if [[ -n $IMAGE ]]; then + # Run docker using the selected image; then build and test + docker run --privileged --cap-add=3DALL -v /lib/modules:/lib/modules \ + -v "$(pwd)":/cwd -e CC=3D$CC -e DISTRO=3D$IMAGE "$IMAGE" sh -e -c " \ + cd /cwd; \ + tests/travis-ci.sh" + exit $? +fi + +if [[ -n $DISTRO ]]; then + do_Install_Dependencies + do_Show_Info +fi + +# Build and test +if [[ "$TRAVIS_OS_NAME" =3D "osx" ]]; then + echo -en 'travis_fold:start:autogen\r' + echo '-- Running ./autogen.sh --' + # The custom PATH is just to pick up OS-X homebrew + PATH=3D"/usr/local/opt/gettext/bin:/usr/local/opt/rpcgen/bin:$PATH" ./= autogen.sh + echo -en 'travis_fold:end:autogen\r' + + # many unit tests fail & so does syntax-check, so skip for now + # one day we must fix it though.... + make -j3 +else + echo -en 'travis_fold:start:autogen\r' + echo '-- Running ./autogen.sh --' + ./autogen.sh + echo -en 'travis_fold:end:autogen\r' + + VIR_TEST_DEBUG=3D1 make -j3 && make -j3 syntax-check && make -j3 check +fi + +exit $? --=20 2.11.0 -- libvir-list mailing list libvir-list@redhat.com https://www.redhat.com/mailman/listinfo/libvir-list