From patchwork Fri Feb 5 16:26:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 8236951 Return-Path: X-Original-To: patchwork-xen-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 3CBA79F38B for ; Fri, 5 Feb 2016 16:30:25 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 3D9C9201EC for ; Fri, 5 Feb 2016 16:30:23 +0000 (UTC) Received: from lists.xen.org (lists.xenproject.org [50.57.142.19]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 97319201DD for ; Fri, 5 Feb 2016 16:30:18 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRjDv-0005wJ-Fn; Fri, 05 Feb 2016 16:27:07 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1aRjDt-0005w1-RX for xen-devel@lists.xen.org; Fri, 05 Feb 2016 16:27:05 +0000 Received: from [85.158.137.68] by server-7.bemta-3.messagelabs.com id E5/6E-23747-95DC4B65; Fri, 05 Feb 2016 16:27:05 +0000 X-Env-Sender: prvs=836b819b4=anthony.perard@citrix.com X-Msg-Ref: server-4.tower-31.messagelabs.com!1454689623!11006800!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 7.35.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 59715 invoked from network); 5 Feb 2016 16:27:04 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-4.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 5 Feb 2016 16:27:04 -0000 X-IronPort-AV: E=Sophos;i="5.22,401,1449532800"; d="scan'208";a="329958387" From: Anthony PERARD To: Xen Devel Date: Fri, 5 Feb 2016 16:26:52 +0000 Message-ID: <1454689613-12814-3-git-send-email-anthony.perard@citrix.com> X-Mailer: git-send-email 2.7.0 In-Reply-To: <1454689613-12814-1-git-send-email-anthony.perard@citrix.com> References: <1454689613-12814-1-git-send-email-anthony.perard@citrix.com> MIME-Version: 1.0 X-DLP: MIA1 Cc: Anthony PERARD , Ian Jackson , Ian Campbell Subject: [Xen-devel] [PATCH v5 2/3] ts-openstack-tempest: Run Tempest to check OpenStack X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Spam-Status: No, score=-4.2 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_MED, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This script runs the OpenStack integration test suite, Tempest. Signed-off-by: Anthony PERARD Acked-by: Ian Campbell --- No change in V5 Change in V4: - use \Q\E for tests names - write the full name of the tests to skip - use push @ignored_test then join() - use variables to store common prefix - rewrite comments Change in V3: - Use host as argument of the script. - Use selecthost() and get rid of $gho. - Use target_jobdir() instead of builddirsprops(). - Put the ignored Tempest tests into a var and try to explain why there are skip. --- sg-run-job | 1 + ts-openstack-tempest | 65 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100755 ts-openstack-tempest diff --git a/sg-run-job b/sg-run-job index a995db5..8695ae8 100755 --- a/sg-run-job +++ b/sg-run-job @@ -413,6 +413,7 @@ proc run-job/test-rumpuserxen {} { proc need-hosts/test-devstack {} { return host } proc run-job/test-devstack {} { run-ts . = ts-openstack-deploy host + run-ts . = ts-openstack-tempest host } if {[file exists sg-run-job-adhoc]} { diff --git a/ts-openstack-tempest b/ts-openstack-tempest new file mode 100755 index 0000000..91c5f3a --- /dev/null +++ b/ts-openstack-tempest @@ -0,0 +1,65 @@ +#!/usr/bin/perl +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2015 Citrix Inc. +# +# This program is free software: you can redistribute it and/or modify +# it under the terms of the GNU Affero General Public License as published by +# the Free Software Foundation, either version 3 of the License, or +# (at your option) any later version. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU Affero General Public License for more details. +# +# You should have received a copy of the GNU Affero General Public License +# along with this program. If not, see . + +use strict qw(vars); +use Osstest; +use Osstest::TestSupport; +use Osstest::BuildSupport; + +tsreadconfig(); +our ($whhost) = @ARGV; +$whhost ||= 'host'; +our $ho = selecthost($whhost); +our $builddir = target_jobdir($ho); + +sub tempest() { + my @ignored_tests; + my $scenario = 'tempest.scenario'; + my $volume_boot_pattern = + "$scenario.test_volume_boot_pattern.TestVolumeBootPattern"; + my $shelve_instance = "$scenario.test_shelve_instance.TestShelveInstance"; + + # Ignore tests which try to boot a guest with /dev/vda as boot device name. + push @ignored_tests, + "^\Q$volume_boot_pattern.test_volume_boot_pattern\E"; + push @ignored_tests, + "^\Q$volume_boot_pattern.test_create_ebs_image_and_check_boot\E"; + push @ignored_tests, + "^\Q$shelve_instance.test_shelve_volume_backed_instance\E"; + + # Those tests access a volume through iSCSI. This does not work when both the + # server and client of iSCSI are on the same Xen host, Linux 4.0 is the first + # Linux to have a fix. + push @ignored_tests, + "^\Q${volume_boot_pattern}V2.test_volume_boot_pattern\E"; + push @ignored_tests, + "^\Q${volume_boot_pattern}V2.test_create_ebs_image_and_check_boot\E"; + + # This regex below select the tests to run and exclude the ones marked as + # slow as well as the explicit tests listed above. + # It is based on the one that can be found in tempest.git/tox.ini + # in the section [testenv:full]. + my $ignored_tests = join("|", @ignored_tests); + my $regex = + "(?!.*\\[.*\\bslow\\b.*\\]|$ignored_tests)(^tempest\\.(api|scenario|thirdparty))"; + + target_cmd($ho, <