From patchwork Thu Nov 24 18:14:11 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 9446153 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id EF75D6071C for ; Thu, 24 Nov 2016 18:16:53 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id D8CC527FBC for ; Thu, 24 Nov 2016 18:16:53 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id B73C52810E; Thu, 24 Nov 2016 18:16:53 +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=-4.2 required=2.0 tests=BAYES_00, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id 3D4BF27FBC for ; Thu, 24 Nov 2016 18:16:51 +0000 (UTC) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9yXW-0005bH-SX; Thu, 24 Nov 2016 18:14:30 +0000 Received: from mail6.bemta3.messagelabs.com ([195.245.230.39]) by lists.xenproject.org with esmtp (Exim 4.84_2) (envelope-from ) id 1c9yXV-0005an-R3 for xen-devel@lists.xen.org; Thu, 24 Nov 2016 18:14:29 +0000 Received: from [85.158.137.68] by server-4.bemta-3.messagelabs.com id 45/D2-20885-50E27385; Thu, 24 Nov 2016 18:14:29 +0000 X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFprAIsWRWlGSWpSXmKPExsXitHSDvS6Lnnm EwcRnKhZLPi5mcWD0OLr7N1MAYxRrZl5SfkUCa8aLQ/MZCzoVKs68v8HSwHhEqouRk0NCwF/i /6prLCA2m4CBxIrpVxlBbBEBWYnVXXPYQWxmgQiJFzdWsYHYwgIhEsu2fWUGsVkEVCXeT9kOV MPBwStgJ7GhPRVipLzEwvNHmEBsTgF7ifub14ONEQIqWb2uiwnCVpO4sXAZ2FpeAUGJkzOfsE CskpA4+OIF8wRG3llIUrOQpBYwMq1i1ChOLSpLLdI1NNRLKspMzyjJTczM0TU0MNbLTS0uTkx PzUlMKtZLzs/dxAgMHQYg2MG4+rfTIUZJDiYlUd7NQuYRQnxJ+SmVGYnFGfFFpTmpxYcYZTg4 lCR4F+oA5QSLUtNTK9Iyc4BBDJOW4OBREuF9CZLmLS5IzC3OTIdInWLU5dgz69UDJiGWvPy8V Clx3mRdoCIBkKKM0jy4EbCIusQoKyXMywh0lBBPQWpRbmYJqvwrRnEORiVhXn2QKTyZeSVwm1 4BHcEEdITkN2OQI0oSEVJSDYyFXp0vtLz9q7WvXni5vXKNMv/Bdwb2FhkbTp2/uWKfSqJPHH/ YgprWBx3tO/5JNLVpF7gvSTF62aNTxcPyOjwy4+HHfwfiX4RduOwd1my9r/uV8PrmjF0LPwdo 8XmfMAuQ1S7cqR5yfv88gfd3NTjOie6Osjcrlt310fKFftfLfs4eBs2DfEosxRmJhlrMRcWJA C2uJRyjAgAA X-Env-Sender: prvs=1297afe57=anthony.perard@citrix.com X-Msg-Ref: server-12.tower-31.messagelabs.com!1480011266!55981792!1 X-Originating-IP: [66.165.176.63] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni42MyA9PiAzMDYwNDg=\n, received_headers: No Received headers X-StarScan-Received: X-StarScan-Version: 9.0.16; banners=-,-,- X-VirusChecked: Checked Received: (qmail 49356 invoked from network); 24 Nov 2016 18:14:28 -0000 Received: from smtp02.citrix.com (HELO SMTP02.CITRIX.COM) (66.165.176.63) by server-12.tower-31.messagelabs.com with RC4-SHA encrypted SMTP; 24 Nov 2016 18:14:28 -0000 X-IronPort-AV: E=Sophos;i="5.31,543,1473120000"; d="scan'208";a="400032621" From: Anthony PERARD To: Date: Thu, 24 Nov 2016 18:14:11 +0000 Message-ID: <20161124181412.18266-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.10.2 In-Reply-To: <20161124181412.18266-1-anthony.perard@citrix.com> References: <20161124181412.18266-1-anthony.perard@citrix.com> MIME-Version: 1.0 Cc: Anthony PERARD , Ian Jackson Subject: [Xen-devel] [OSSTEST PATCH v8 2/3] ts-openstack-tempest: Run Tempest to check OpenStack X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xen.org Sender: "Xen-devel" X-Virus-Scanned: ClamAV using ClamSMTP This script runs the OpenStack integration test suite, Tempest. Signed-off-by: Anthony PERARD Acked-by: Ian Campbell Acked-by: Ian Jackson --- Changes in V8: - fix copyright year - fix job name in sg-run-job - fix too long lines Changes in V7: - reindent - acked 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 | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100755 ts-openstack-tempest diff --git a/sg-run-job b/sg-run-job index 0d65c8a..13011c0 100755 --- a/sg-run-job +++ b/sg-run-job @@ -477,6 +477,7 @@ proc run-job/test-rumprun {} { 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..b51eaf1 --- /dev/null +++ b/ts-openstack-tempest @@ -0,0 +1,64 @@ +#!/usr/bin/perl +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2016 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 (both in dom0), + # 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, <