From patchwork Sat Jul 20 18:24:09 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1134477 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="KpgPkJgD"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45rcTZ58zDz9sBF for ; Sun, 21 Jul 2019 04:53:38 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 5466AC21D8A; Sat, 20 Jul 2019 18:37:28 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id BA6C4C21ECA; Sat, 20 Jul 2019 18:27:09 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id D1E68C21E0B; Sat, 20 Jul 2019 18:25:34 +0000 (UTC) Received: from mail-io1-f50.google.com (mail-io1-f50.google.com [209.85.166.50]) by lists.denx.de (Postfix) with ESMTPS id DD5EBC21DB3 for ; Sat, 20 Jul 2019 18:25:27 +0000 (UTC) Received: by mail-io1-f50.google.com with SMTP id q22so65244586iog.4 for ; Sat, 20 Jul 2019 11:25:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=bq1FMPQvKhuOKit27w+UatmZV1/555H3OhPD+1qRSGk=; b=KpgPkJgDylWvjlPHxwyHRoISXo7vvKNmQAKXwEED9tQMuGBBmt/a9WIpP13yeuIpMf abVES0qdzVREMFb3xuUxia88+ts1FMYbd1iK+5dsbfN4FVTkELcYKboV/6D1ydTTROcJ OnfAIX95b9hivPK0dDxpZ0mrGzBUG/eyxZqtk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=bq1FMPQvKhuOKit27w+UatmZV1/555H3OhPD+1qRSGk=; b=hPHBfr4DI9J58ozFlV6T13sDVbx8xA1megX0lIsfU22D3fFvSGwoPy72nKP/KclL63 h/ahFnGBAgsbVv5tD8y8zgKarRgSuSY90A/9iH967IN7dfcagJWQHfA4rTX2pLTgS648 ZIa55F1dQC0g+3Ku0sSzMXUvL3H+RlOB/9Hdv7M+DID45k2X0HKerutjc4z58w8L6WJr ekKG4u5jiYM6hZG5XhjPEIiQJYw0HU6Hs2QUXo47EHuv7Yrm8COcg9GvJm2hWdpTAVa9 iLzcS+Vo+N6Cy63YDcMqmvCNykSUGzIzoZfGXU2JmkKty5ejpfco2/W5e34S6DuVMti7 Bv+w== X-Gm-Message-State: APjAAAUbJUBJzrPd/7ZSNPOSjmpictgH+61SZZ0dKpECI3h6S9LDalsH C966jW5i3kqdht219LT5OVq6CbgUcU4= X-Google-Smtp-Source: APXvYqyHHNdfLfr0F6WrkcqTsJ2zU+qIATU4e4HfffR/CqNAY/r929jNT5oh7PLGQ1vYiHSwKfbMxQ== X-Received: by 2002:a02:230a:: with SMTP id u10mr62218439jau.117.1563647126821; Sat, 20 Jul 2019 11:25:26 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id z17sm49778933iol.73.2019.07.20.11.25.26 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:25:26 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 20 Jul 2019 12:24:09 -0600 Message-Id: <20190720182416.183626-48-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog In-Reply-To: <20190720182416.183626-1-sjg@chromium.org> References: <20190720182416.183626-1-sjg@chromium.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 47/53] binman: Add a test function to clean up the output dir X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Put tearDown()'s logic into a new _CleanupOutputDir() function so that it can be called from elsewhere. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/binman/ftest.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index 12e32a0b5de..a490d394d86 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -187,6 +187,13 @@ class TestFunctional(unittest.TestCase): if not self.have_lz4: self.skipTest('lz4 --no-frame-crc not available') + def _CleanupOutputDir(self): + """Remove the temporary output directory""" + if self.preserve_outdirs: + print('Preserving output dir: %s' % tools.outdir) + else: + tools._FinaliseForTest() + def setUp(self): # Enable this to turn on debugging output # tout.Init(tout.DEBUG) @@ -194,10 +201,7 @@ class TestFunctional(unittest.TestCase): def tearDown(self): """Remove the temporary output directory""" - if self.preserve_outdirs: - print('Preserving output dir: %s' % tools.outdir) - else: - tools._FinaliseForTest() + self._CleanupOutputDir() @classmethod def _ResetDtbs(self):