From patchwork Tue Sep 22 16:11:48 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Damien Lespiau X-Patchwork-Id: 521176 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BFFD41401AD for ; Wed, 23 Sep 2015 02:13:13 +1000 (AEST) Received: from lists.ozlabs.org (lists.ozlabs.org [IPv6:2401:3900:2:1::3]) by lists.ozlabs.org (Postfix) with ESMTP id A66551A023F for ; Wed, 23 Sep 2015 02:13:13 +1000 (AEST) X-Original-To: patchwork@lists.ozlabs.org Delivered-To: patchwork@lists.ozlabs.org Received: from mga01.intel.com (mga01.intel.com [192.55.52.88]) by lists.ozlabs.org (Postfix) with ESMTP id 9E97F1A0048 for ; Wed, 23 Sep 2015 02:12:26 +1000 (AEST) Received: from fmsmga001.fm.intel.com ([10.253.24.23]) by fmsmga101.fm.intel.com with ESMTP; 22 Sep 2015 09:12:04 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.17,573,1437462000"; d="scan'208";a="794882597" Received: from pjanik-mobl1.ger.corp.intel.com (HELO strange.ger.corp.intel.com) ([10.252.32.80]) by fmsmga001.fm.intel.com with ESMTP; 22 Sep 2015 09:12:01 -0700 From: Damien Lespiau To: patchwork@lists.ozlabs.org Subject: [PATCH 5/6] tests: Add a way for the user to skip selenium tests Date: Tue, 22 Sep 2015 17:11:48 +0100 Message-Id: <1442938309-3195-6-git-send-email-damien.lespiau@intel.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1442938309-3195-1-git-send-email-damien.lespiau@intel.com> References: <1442938309-3195-1-git-send-email-damien.lespiau@intel.com> X-BeenThere: patchwork@lists.ozlabs.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Patchwork development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: patchwork-bounces+incoming=patchwork.ozlabs.org@lists.ozlabs.org Sender: "Patchwork" It's a bit more convoluted to setup the test environment to work with selenium (eg. needs a browser installed and Xorg running, ...). It's possible someone would want to skip those. Signed-off-by: Damien Lespiau --- patchwork/tests/browser.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/patchwork/tests/browser.py b/patchwork/tests/browser.py index 9a6c4de..5047928 100644 --- a/patchwork/tests/browser.py +++ b/patchwork/tests/browser.py @@ -94,6 +94,10 @@ class SeleniumTestCase(StaticLiveServerTestCase): _SCREENSHOT_DIR = os.path.dirname(__file__) + '/../../selenium_screenshots' def setUp(self): + self.skip = os.getenv('PATCHWORK_SKIP_BROWSER_TESTS', None) + if self.skip: + self.skipTest("Disabled by environment variable") + super(SeleniumTestCase, self).setUp() self.browser = os.getenv('SELENIUM_BROWSER', 'chrome')