From patchwork Fri Mar 21 09:57:59 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ian Campbell X-Patchwork-Id: 26799 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f200.google.com (mail-pd0-f200.google.com [209.85.192.200]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id E898720143 for ; Fri, 21 Mar 2014 10:00:16 +0000 (UTC) Received: by mail-pd0-f200.google.com with SMTP id p10sf4961285pdj.7 for ; Fri, 21 Mar 2014 03:00:15 -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=hXMvlRaSyeoguWpQKEbXQ+Un/st6p+RAy3RsW2MBAsk=; b=ZBVB/MM2rNoX0vJOwWV5IZuZZEg55X4PxHSbDqKPHNMIRSPJ9gHuYmOz46j6y6wfmM c3scekIZHsWb7CdkCum8f1nwQUqwSdTvaYAlTL181+X0SIEbanHBjp7luL0EXVr51JDr pjb1mqyeetTUnrYojnZxTYF/IojoZ7zKndTM8tOhOrzJA/oX3L4XWgb1Ql1SIiLy/OLs S5wADkZNOCI9YK7Lr90/lNXgcN68cqbqd1RZlmi19E7rNrmXKW8UStJrE9I9tDTwcQSP 5b/UoAd/9IsOSVK/dp6LaLcWvN/3mF+9ZyDUplLHhVC0V+46oVcBbOe98zRCryC8kUSQ KbCw== X-Gm-Message-State: ALoCoQmlWrG8UlFSp+0p+DKoR6SY0Zybc/1WyjJbXKfk1CFTEYyi1Qwvo3Ilw/wxXOc5a90CKE3u X-Received: by 10.66.141.135 with SMTP id ro7mr755323pab.28.1395396015966; Fri, 21 Mar 2014 03:00:15 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.17.3 with SMTP id 3ls632673qgc.83.gmail; Fri, 21 Mar 2014 03:00:15 -0700 (PDT) X-Received: by 10.221.27.8 with SMTP id ro8mr7427931vcb.30.1395396015718; Fri, 21 Mar 2014 03:00:15 -0700 (PDT) Received: from mail-ve0-f182.google.com (mail-ve0-f182.google.com [209.85.128.182]) by mx.google.com with ESMTPS id rx10si1047750vdc.204.2014.03.21.03.00.15 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Fri, 21 Mar 2014 03:00:15 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.128.182 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.182; Received: by mail-ve0-f182.google.com with SMTP id jw12so2319094veb.13 for ; Fri, 21 Mar 2014 03:00:15 -0700 (PDT) X-Received: by 10.52.126.107 with SMTP id mx11mr5668731vdb.41.1395396015616; Fri, 21 Mar 2014 03:00:15 -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 i9csp18431vck; Fri, 21 Mar 2014 03:00:15 -0700 (PDT) X-Received: by 10.52.126.107 with SMTP id mx11mr5668716vdb.41.1395396015201; Fri, 21 Mar 2014 03:00:15 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id fi2si1051099vdb.154.2014.03.21.03.00.14 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Fri, 21 Mar 2014 03:00: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 1WQwDG-0007Fe-0K; Fri, 21 Mar 2014 09:58:06 +0000 Received: from mail6.bemta14.messagelabs.com ([193.109.254.103]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WQwDE-0007FU-B8 for xen-devel@lists.xen.org; Fri, 21 Mar 2014 09:58:04 +0000 Received: from [193.109.254.147:28859] by server-7.bemta-14.messagelabs.com id 42/B9-17726-B2D0C235; Fri, 21 Mar 2014 09:58:03 +0000 X-Env-Sender: Ian.Campbell@citrix.com X-Msg-Ref: server-10.tower-27.messagelabs.com!1395395881!3258182!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 28422 invoked from network); 21 Mar 2014 09:58:02 -0000 Received: from smtp.citrix.com (HELO SMTP.CITRIX.COM) (66.165.176.89) by server-10.tower-27.messagelabs.com with RC4-SHA encrypted SMTP; 21 Mar 2014 09:58:02 -0000 X-IronPort-AV: E=Sophos;i="4.97,702,1389744000"; d="scan'208";a="113579648" Received: from accessns.citrite.net (HELO FTLPEX01CL03.citrite.net) ([10.9.154.239]) by FTLPIPO01.CITRIX.COM with ESMTP; 21 Mar 2014 09:58:01 +0000 Received: from norwich.cam.xci-test.com (10.80.248.129) by smtprelay.citrix.com (10.13.107.80) with Microsoft SMTP Server id 14.2.342.4; Fri, 21 Mar 2014 05:58:00 -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 1WQwDA-0003MQ-Jf; Fri, 21 Mar 2014 09:58:00 +0000 From: Ian Campbell To: Date: Fri, 21 Mar 2014 09:57:59 +0000 Message-ID: <1395395880-28830-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 v2 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.182 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 Acked-by: Ian Jackson --- v2: correct usage and argument parsing --- 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..8b005f1 --- /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 < +END +} + +if [ $# -ne 2 ] ; then + usage >&2 + exit 1 +fi + +db="$1" +flight="$2" + +sqlite3 "$db" <. + +set -e + +usage(){ + cat <&2 + exit 1 +fi + +db="$1" + +sqlite3 "$db" <