From patchwork Mon Nov 13 04:52:22 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 837351 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; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=google.com header.i=@google.com header.b="TNNXMd/U"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3yZzCQ5q5Zz9s71 for ; Mon, 13 Nov 2017 16:07:14 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 6806EC21E76; Mon, 13 Nov 2017 04:58:24 +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=RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL, 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 DE21DC21ECE; Mon, 13 Nov 2017 04:54:23 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 043A0C21EE8; Mon, 13 Nov 2017 04:53:24 +0000 (UTC) Received: from mail-ot0-f196.google.com (mail-ot0-f196.google.com [74.125.82.196]) by lists.denx.de (Postfix) with ESMTPS id BE698C21E41 for ; Mon, 13 Nov 2017 04:53:18 +0000 (UTC) Received: by mail-ot0-f196.google.com with SMTP id s12so6309673otc.0 for ; Sun, 12 Nov 2017 20:53:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references; bh=g0P408rHg6k1PCZwdrVM3YvWY9Klmip2IVy+wJEk374=; b=TNNXMd/UWYLGKkrpzaquGBJ2FmsLWia91k9P/sQI8AfhLdGX9JfyCQymrGk8m+JIMA lsg5SA+EFyPOFVDa7l99+UgNQtNs7gwdxzLudeiOY0ErpAl9rURy0RRuRfzNlljG/rEn +ARK01FO0UHDAwUlZxGN4/PC1Im7zYv55CqFJg8iUf+tC+nECxG64OEH9ZFZKncIsFT2 rfNk07s5BrruMUTB+Y6e00MCZ84fCpIKIppSyAa4MZisfVMdO2+eu4hY9k1+0r7ancN6 22irNOP0nRrfNSlzPuMqKhQiQh5FViYGhR9QhrA1IDSN5AIg6ZE0TdUQQBrLTBDvtMME ULbg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references; bh=g0P408rHg6k1PCZwdrVM3YvWY9Klmip2IVy+wJEk374=; b=LuPuteH40QiXlYJXtHuGKpMTigWmdVjVOPq6Pe7J416C7VUHIIwO4sBMZgrqia8si7 wE4WGDFgdWoDvU4PphqHiS+1GQYx1OJgVMF39/oG9zrMDhORV3CVYBzAonPaMgfQClsy hJYVs0Zw/H+4i9L8EstcgIMp+6MRcRMeYp3J0h5SSTf5pL9d6VTl38XAfhizAcALVyE0 nSDW0N2o5v5aCKxO74Zq3i1m+jKubK7g57UwzROS7dKV2KyWXm8/PKZc9QWV5EPh2NDp C7Zfh/lkb67nIcNqqsy+xx86m3cUZehCyx/hkLnL6zlcA0E6f4CNFhpNDDyXpI8xFsSO kxQw== X-Gm-Message-State: AJaThX6f/XEks1i/ZyDWT4lgj6tzZCgxZHVYcOeZz15FcRNdZPQmF40r e2dNScRdU5iTGTeSD2zQUVXzFw== X-Google-Smtp-Source: AGs4zMZ37CRLLj5cjepKBH9ipyI3Y2fhIFVQ0nsVKnAke0DxS83f0nzqHDyzpfJ1FcV8fKk07PZufQ== X-Received: by 10.157.3.98 with SMTP id 89mr3241195otv.485.1510548797315; Sun, 12 Nov 2017 20:53:17 -0800 (PST) Received: from kiwi.bld.corp.google.com ([2620:0:10f2:0:78e6:d28d:f9bb:2b9c]) by smtp.gmail.com with ESMTPSA id r129sm6913399oig.14.2017.11.12.20.53.16 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2017 20:53:16 -0800 (PST) Received: by kiwi.bld.corp.google.com (Postfix, from userid 121222) id 1A900142417; Sun, 12 Nov 2017 21:53:16 -0700 (MST) From: Simon Glass To: U-Boot Mailing List Date: Sun, 12 Nov 2017 21:52:22 -0700 Message-Id: <20171113045231.15911-19-sjg@chromium.org> X-Mailer: git-send-email 2.15.0.448.gf294e3d99a-goog In-Reply-To: <20171113045231.15911-1-sjg@chromium.org> References: <20171113045231.15911-1-sjg@chromium.org> Cc: Tom Rini Subject: [U-Boot] [PATCH 18/26] binman: Add a main program to the tests 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: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Add a main program so that the tests can be executed directly, without going through the main binman program. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/binman/entry_test.py | 4 ++++ tools/binman/ftest.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/tools/binman/entry_test.py b/tools/binman/entry_test.py index 789b26fd9f5..caa523ebf89 100644 --- a/tools/binman/entry_test.py +++ b/tools/binman/entry_test.py @@ -55,3 +55,7 @@ class TestEntry(unittest.TestCase): entry.Entry.Create(None, node, node.name) self.assertIn("Unknown entry type 'invalid-name' in node " "'invalid-path'", str(e.exception)) + + +if __name__ == "__main__": + unittest.main() diff --git a/tools/binman/ftest.py b/tools/binman/ftest.py index eae1ab1c4b1..539ebc57f57 100644 --- a/tools/binman/ftest.py +++ b/tools/binman/ftest.py @@ -813,3 +813,7 @@ class TestFunctional(unittest.TestCase): """Test that an image with a VBT binary can be created""" data = self._DoReadFile('46_intel-vbt.dts') self.assertEqual(VBT_DATA, data[:len(VBT_DATA)]) + + +if __name__ == "__main__": + unittest.main()