From patchwork Thu Mar 20 16:21:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26737 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-ie0-f199.google.com (mail-ie0-f199.google.com [209.85.223.199]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 328C220534 for ; Thu, 20 Mar 2014 16:23:18 +0000 (UTC) Received: by mail-ie0-f199.google.com with SMTP id rl12sf3748946iec.6 for ; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id :mime-version:cc:subject:precedence:list-id:list-unsubscribe :list-post:list-help:list-subscribe:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=tVXGFotlSb03WSFklQ6LXvfqtRj5I0Auh8zyzmSI1LE=; b=gl8UIGFQ8TgXCwG1mWSTnBilBSJrfXsRGNizfeOVT57HzrJ210604OWcaKlS36DGiK lSpPDV+6LP2P7bYC/xz2NXajujDlj0q84kBAWycDhDtBJnvI0BYzMkRhp/nuv7xtJg+a JhJH2d3KKWI2Poe1oyRcKTmRAYIsoQEDcJ1KFJ1hlKqc7F75xUhmu/AYrw5qhCux2aNV QwFmGjG3w36g7ShlAHo18nSOo2GH+SPRIzVYMSYXJ5o0Ii7fGtxAWUllCX6avdJL4WFL 7Ra516avQ4r66LsoSSpzyzk3e2UNH2miP099aqOj3n4K4GqijGDS0wO4ewjONfrPPPoL fmOA== X-Gm-Message-State: ALoCoQn4Zt9KQH9OgKEiSytpVVp5nYmW+EJZqksPFj4Pdjp8zSZXShpu7LPeZzy62NZu2Tl9FPNd X-Received: by 10.50.176.229 with SMTP id cl5mr13756680igc.3.1395332597713; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.100.137 with SMTP id s9ls289597qge.57.gmail; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) X-Received: by 10.58.161.101 with SMTP id xr5mr4359636veb.36.1395332597593; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) Received: from mail-ve0-f169.google.com (mail-ve0-f169.google.com [209.85.128.169]) by mx.google.com with ESMTPS id cm9si520777vcb.154.2014.03.20.09.23.17 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Thu, 20 Mar 2014 09:23:17 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.128.169; Received: by mail-ve0-f169.google.com with SMTP id pa12so1217815veb.14 for ; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) X-Received: by 10.220.192.71 with SMTP id dp7mr1007338vcb.45.1395332597486; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp401257vck; Thu, 20 Mar 2014 09:23:17 -0700 (PDT) X-Received: by 10.140.46.74 with SMTP id j68mr49285095qga.71.1395332595533; Thu, 20 Mar 2014 09:23:15 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id c7si986943qar.76.2014.03.20.09.23.15 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Thu, 20 Mar 2014 09:23:15 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQfih-0003tu-6Q; Thu, 20 Mar 2014 16:21:27 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQfif-0003ti-QY for xen-devel@lists.xen.org; Thu, 20 Mar 2014 16:21:26 +0000 Received: from [193.109.254.147:52023] by server-6.bemta-14.messagelabs.com id 6E/3F-13066-5851B235; Thu, 20 Mar 2014 16:21:25 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-13.tower-27.messagelabs.com!1395332483!3074169!1 X-Originating-IP: [66.165.176.89] X-SpamReason: No, hits=0.0 required=7.0 tests=sa_preprocessor: VHJ1c3RlZCBJUDogNjYuMTY1LjE3Ni44OSA9PiAyMDMwMDc=\n X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 15400 invoked from network); 20 Mar 2014 16:21:24 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-13.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 20 Mar 2014 16:21:24 -0000 X-IronPort-AV: E=Sophos;i="4.97,695,1389744000"; d="scan'208";a="113324533" Received: from accessns.citrite.net (HELO FTLPEX01CL02.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 20 Mar 2014 16:21:22 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.79) with Microsoft SMTP Server id 14.2.342.4; Thu, 20 Mar 2014 12:21:22 -0400 Received: from spare.cam.xci-test.com ([10.80.2.80] helo=kazak.uk.xensource.com.) by norwich.cam.xci-test.com with esmtp (Exim 4.72) (envelope-from ) id 1WQfic-0006Zu-3k; Thu, 20 Mar 2014 16:21:22 +0000 From: Ian Campbell To: Date: Thu, 20 Mar 2014 16:21:21 +0000 Message-ID: <1395332482-5892-1-git-send-email-ian.campbell@citrix.com> X-Mailer: git-send-email 1.8.5.2 MIME-Version: 1.0 X-DLP: MIA1 Cc: Ian Campbell , xen-devel@lists.xen.org Subject: [Xen-devel] [PATCH OSSTEST 1/2] standalone: refactor out some useful bits of standalone-reset X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: ian.campbell@citrix.com X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.128.169 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: I sometimes want just these bits. I went with a new "sa" prefix, but I left standalone-reset alone since it is already reasonably well known. Signed-off-by: Ian Campbell --- README | 3 +++ sa-forget-flight | 39 +++++++++++++++++++++++++++++++++++++++ sa-init-db | 56 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ standalone-reset | 30 ++---------------------------- 4 files changed, 100 insertions(+), 28 deletions(-) create mode 100755 sa-forget-flight create mode 100755 sa-init-db diff --git a/README b/README index a4d5aac..9a85549 100644 --- a/README +++ b/README @@ -158,6 +158,9 @@ sg-*: ? ts-*: Test Step scripts. +sa-*: Standalone mode. + + Jobs ==== diff --git a/sa-forget-flight b/sa-forget-flight new file mode 100755 index 0000000..65668f5 --- /dev/null +++ b/sa-forget-flight @@ -0,0 +1,39 @@ +#!/bin/bash + +# This is part of "osstest", an automated testing framework for Xen. +# Copyright (C) 2014 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 . + +set -e + +usage(){ + cat <&2 + exit 1 +fi + +db="$1" +flight="$1" + +sqlite3 "$db" <. + +set -e + +usage(){ + cat <&2 + exit 1 +fi + +db="$1" + +sqlite3 "$db" <