From patchwork Tue Feb 1 17:26:28 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Lo=C3=AFc_Minier?= X-Patchwork-Id: 52 Return-Path: Delivered-To: unknown Received: from imap.gmail.com (74.125.159.109) by localhost6.localdomain6 with IMAP4-SSL; 08 Jun 2011 14:39:34 -0000 Delivered-To: patches@linaro.org Received: by 10.147.124.5 with SMTP id b5cs111746yan; Tue, 1 Feb 2011 09:26:30 -0800 (PST) Received: by 10.227.157.1 with SMTP id z1mr8107589wbw.23.1296581189250; Tue, 01 Feb 2011 09:26:29 -0800 (PST) Received: from adelie.canonical.com (adelie.canonical.com [91.189.90.139]) by mx.google.com with ESMTP id s18si37133297wbh.93.2011.02.01.09.26.28; Tue, 01 Feb 2011 09:26:29 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) client-ip=91.189.90.139; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of bounces@canonical.com designates 91.189.90.139 as permitted sender) smtp.mail=bounces@canonical.com Received: from loganberry.canonical.com ([91.189.90.37]) by adelie.canonical.com with esmtp (Exim 4.71 #1 (Debian)) id 1PkJzo-0008Q1-P2 for ; Tue, 01 Feb 2011 17:26:28 +0000 Received: from loganberry.canonical.com (localhost [127.0.0.1]) by loganberry.canonical.com (Postfix) with ESMTP id BA6312E8031 for ; Tue, 1 Feb 2011 17:26:28 +0000 (UTC) MIME-Version: 1.0 X-Launchpad-Project: linaro-image-tools X-Launchpad-Branch: ~linaro-maintainers/linaro-image-tools/trunk X-Launchpad-Message-Rationale: Subscriber X-Launchpad-Branch-Revision-Number: 280 X-Launchpad-Notification-Type: branch-revision To: Linaro Patch Tracker From: noreply@launchpad.net Subject: [Branch ~linaro-maintainers/linaro-image-tools/trunk] Rev 280: Merge lp:~lool/linaro-image-tools/temp-tarball; fixes warnings when running Message-Id: <20110201172628.8143.80516.launchpad@loganberry.canonical.com> Date: Tue, 01 Feb 2011 17:26:28 -0000 Reply-To: noreply@launchpad.net Sender: bounces@canonical.com Errors-To: bounces@canonical.com Precedence: bulk X-Generated-By: Launchpad (canonical.com); Revision="12274"; Instance="initZopeless config overlay" X-Launchpad-Hash: 21437c4d4e0c8e0fa603fe177b934a5f977ad59e Merge authors: Loïc Minier (lool) Related merge proposals: https://code.launchpad.net/~lool/linaro-image-tools/temp-tarball/+merge/48150 proposed by: Loïc Minier (lool) review: Approve - James Westby (james-w) ------------------------------------------------------------ revno: 280 [merge] committer: Loïc Minier branch nick: linaro-image-tools timestamp: Tue 2011-02-01 18:24:51 +0100 message: Merge lp:~lool/linaro-image-tools/temp-tarball; fixes warnings when running testsuite. modified: linaro_media_create/tests/fixtures.py --- lp:linaro-image-tools https://code.launchpad.net/~linaro-maintainers/linaro-image-tools/trunk You are subscribed to branch lp:linaro-image-tools. To unsubscribe from this branch go to https://code.launchpad.net/~linaro-maintainers/linaro-image-tools/trunk/+edit-subscription === modified file 'linaro_media_create/tests/fixtures.py' --- linaro_media_create/tests/fixtures.py 2011-01-28 19:50:48 +0000 +++ linaro_media_create/tests/fixtures.py 2011-02-01 16:06:46 +0000 @@ -44,19 +44,24 @@ class CreateTarballFixture(object): - def __init__(self, dir): - self.dir = dir - self.tarball = os.path.join(self.dir, 'tarball.tar.gz') + def __init__(self, basedir, reldir='tarball', filename='tarball.tar.gz'): + self.basedir = basedir + self.reldir = reldir + self.tarball = os.path.join(self.basedir, filename) def setUp(self): # Create gzipped tar archive. - args = ['tar', '-czf', self.tarball, self.dir] + os.mkdir(os.path.join(self.basedir, reldir)) + args = ['tar', '-C', self.basedir, '-czf', self.tarball, self.reldir] proc = subprocess.Popen(args) proc.wait() def tearDown(self): if os.path.exists(self.tarball): os.remove(self.tarball) + dir = os.path.join(self.basedir, subdir) + if os.path.exists(dir): + os.rmdir(dir) def get_tarball(self): return self.tarball