Return-Path: Received: by yocto-www.yoctoproject.org (Postfix, from userid 118) id E2C53E00AAB; Mon, 25 Apr 2016 11:05:14 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on yocto-www.yoctoproject.org X-Spam-Level: X-Spam-Status: No, score=-2.6 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_LOW autolearn=ham version=3.3.1 X-Spam-HAM-Report: * -0.7 RCVD_IN_DNSWL_LOW RBL: Sender listed at http://www.dnswl.org/, low * trust * [209.85.220.49 listed in list.dnswl.org] * -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily * valid * -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by yocto-www.yoctoproject.org (Postfix) with ESMTP id B5F4BE00948 for ; Mon, 25 Apr 2016 11:05:11 -0700 (PDT) Received: by mail-pa0-f49.google.com with SMTP id r5so61312432pag.1 for ; Mon, 25 Apr 2016 11:05:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=intel-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=tDmGeNTQIlUN8Sg5xpPU303lqRGIM4hKL21pzj3dKCc=; b=0CxLAEThoak/+7v+inji+JYhpnYwbeeffWjYyaGBwuKsEldrHWlBcU8/2zA5V2E8ml vcZFoD2/e8pn7EGknc2oft9YRJEUqbNSvCQ14h1p7Vb5qZyaYHKvOtYk86Hcx/XFgGCp 2sFEJ8/ROSk2FqcMbyOjvjyWViuthviAlPKxzgqFFehqWevYOXxrkdF0G/zUa2EcMcrI NGgwNwoVaJag5rub4SkWJdzug5/SuGXD1Wt/t6sLGxW/NySwdd+zyevrRe3f0GyYuAwF SFmMdqZCaM9btqlBNRrh9NslFE1NCw8miW4Hr+OL70fkIZLbBVL2T09whWEB8z6x7ft+ P4Uw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=tDmGeNTQIlUN8Sg5xpPU303lqRGIM4hKL21pzj3dKCc=; b=GjX0frkeOJYtjE4ll4Sx4P9p46bBQV3RJgRi8toL4nXokT7oBzwmtr8eGTndlSg5wI fZkigpV8kPiNdWgDAMcOyJiu/NHKIE5iHlICt6m2Wrz0xFyZTkh/EWhoF1Z1H3FNGJxk GKhJLRZwvKQF+scyxQmwDVnm5Nh70HhdBKaaKPAT1LkbxwP/O44IctooCetirXFbKmDQ fPvg0ObOHeuGdiqS56Kovu0768UsZiL2hMxkpHrfOYIMvY0v/IHAD1QlahyFHm8ieMcS 31LSWkJ2eUg2wahrbXNfH78peawH13OpwsWPhlcfyVhxtU3FYfgrzc8ia75SYjFq5iYa KUYg== X-Gm-Message-State: AOPr4FX/2Y+gH4bRoVADTuE5kUl49PFfismsXu89ba3yH1ws2YTBtwzbQs1oZuqMwC5QZ+mX X-Received: by 10.66.118.70 with SMTP id kk6mr50800985pab.74.1461607510852; Mon, 25 Apr 2016 11:05:10 -0700 (PDT) Received: from dorado.ger.corp.intel.com ([192.55.54.44]) by smtp.gmail.com with ESMTPSA id c190sm15573288pfb.33.2016.04.25.11.05.09 (version=TLS1_2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Mon, 25 Apr 2016 11:05:10 -0700 (PDT) From: Michael Wood To: toaster@yoctoproject.org Date: Mon, 25 Apr 2016 19:04:55 +0100 Message-Id: <1461607497-17591-3-git-send-email-michael.g.wood@intel.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1461607497-17591-1-git-send-email-michael.g.wood@intel.com> References: <1461607497-17591-1-git-send-email-michael.g.wood@intel.com> Subject: [PATCH 3/5] toaster: Add a specific test settings file X-BeenThere: toaster@yoctoproject.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: Web based interface for BitBake List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 25 Apr 2016 18:05:15 -0000 When running certain tests we want a particular database specified. When bitbake toaster ui is being tested pass it these test settings so that it uses the same database as the unit tests running. Signed-off-by: Michael Wood --- bitbake/lib/toaster/toastermain/settings-test.py | 41 ++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 bitbake/lib/toaster/toastermain/settings-test.py diff --git a/bitbake/lib/toaster/toastermain/settings-test.py b/bitbake/lib/toaster/toastermain/settings-test.py new file mode 100644 index 0000000..36b14c0 --- /dev/null +++ b/bitbake/lib/toaster/toastermain/settings-test.py @@ -0,0 +1,41 @@ +# +# ex:ts=4:sw=4:sts=4:et +# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*- +# +# BitBake Toaster Implementation +# +# Copyright (C) 2016 Intel Corporation +# +# This program is free software; you can redistribute it and/or modify +# it under the terms of the GNU General Public License version 2 as +# published by the Free Software Foundation. +# +# 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 General Public License for more details. +# +# You should have received a copy of the GNU General Public License along +# with this program; if not, write to the Free Software Foundation, Inc., +# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. + +# Django settings for Toaster project. + +# Settings overlay to use for running tests +# DJANGO_SETTINGS_MODULE=toastermain.settings-test + +from settings import * + +DEBUG = True +TEMPLATE_DEBUG = DEBUG + +DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': '/tmp/toaster-test-db.sqlite', + 'TEST': { + 'ENGINE': 'django.db.backends.sqlite3', + 'NAME': '/tmp/toaster-test-db.sqlite', + } + } +} -- 2.7.4