From patchwork Sat May 12 02:58:29 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ricardo Martincoski X-Patchwork-Id: 912359 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="k9M1dDhb"; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 40jWs30sMgz9s19 for ; Sat, 12 May 2018 12:59:35 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id BB01030167; Sat, 12 May 2018 02:59:32 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id HL5AvAwhnB-G; Sat, 12 May 2018 02:59:28 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2F9F522647; Sat, 12 May 2018 02:59:28 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id CDE401CF106 for ; Sat, 12 May 2018 02:59:23 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id C6BD588623 for ; Sat, 12 May 2018 02:59:23 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org X-Amavis-Alert: BAD HEADER SECTION, Duplicate header field: "References" Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Vx99oWyUR7u4 for ; Sat, 12 May 2018 02:59:15 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-qk0-f196.google.com (mail-qk0-f196.google.com [209.85.220.196]) by whitealder.osuosl.org (Postfix) with ESMTPS id F0B0A87610 for ; Sat, 12 May 2018 02:59:11 +0000 (UTC) Received: by mail-qk0-f196.google.com with SMTP id s83-v6so817226qke.7 for ; Fri, 11 May 2018 19:59:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :in-reply-to:references; bh=0Io39j+CefyfwugyDbb2KmKnzdeKYKuonIQsAQbuqcE=; b=k9M1dDhbgjYywyNQEh7E1ZZZLoJPUDFAkXpGaRT/448/EYEMDOT9EOIhTipqHeNXVs sMb1ut9HQiTuxMLjEn4BsLOkimKwkz//gjB1qH1PxZNaA6dR2vz9NeJUYtYer6h7yGzC +WtRU4gOuAF7HTPSbg/o4EXIEXtBCukPw2r+hxT07cQmXJ9XosTlek9jf/nBy9IU4LAI 4fQiMVRwubMNM7mz7PmOHLgJQ5bjbZSr7vBE0T8BSYZa7w7VY5l8HDWMDC06EN4COj8K eBQi7xoLJo9n1l9ARme50pkNXl4BbATLvIjkmbFXIOSHxd7nSbFk1cvcHQmCbWrxB3N3 RibQ== 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:in-reply-to:references; bh=0Io39j+CefyfwugyDbb2KmKnzdeKYKuonIQsAQbuqcE=; b=Bzgr8hcqbqygViVxW/HHq7DSuUMFFT3WPfXPgh9XNI/FlX0VWnBWhrzbRuwpqA5Y3W k9VLv2oziB+u8EWm9Swzo1UumlPLEbkyUu/1tfZLpU+kLr1bNlMdC4CfddoY6sQWMtvV bbgkSGDuEYJfLcJRrJkqg+1ewCdWGBDivSIl9vGOn62Sl5DDeoeOlBfwZKzpiWPMmGBc PbQGw+rv1h8bRQVMiR8K9NLnwChj0bPDUK4XbSaArg1GhA7uHtRHxQmm5TotOHGsVZsb sM1mQIpYXnC9wUaK21djOK7r+XtqucPCMOBBP4t0M1qEdDNxdtHF7leI28UJTW63QdY7 vvfw== X-Gm-Message-State: ALKqPwexf/yyYgVgI2v5JLnBaO+dbGMgnemWnDmmRulb3LMfggY/fsER kgvORo3wPXzTPHRs2hcIvXAnEg== X-Google-Smtp-Source: AB8JxZryzLVN+s+QLGMqSgC9DEzQK+9Hzy1EeCciyAHk3ClnKQpF9wJbL9ncqnXv0qpsp9xR7bU4wQ== X-Received: by 2002:a37:9285:: with SMTP id u127-v6mr474209qkd.261.1526093950670; Fri, 11 May 2018 19:59:10 -0700 (PDT) Received: from ultri5.home ([189.114.97.193]) by smtp.gmail.com with ESMTPSA id l38-v6sm3832914qta.86.2018.05.11.19.59.07 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 11 May 2018 19:59:10 -0700 (PDT) From: Ricardo Martincoski To: buildroot@buildroot.org Date: Fri, 11 May 2018 23:58:29 -0300 Message-Id: <20180512025833.22998-7-ricardo.martincoski@gmail.com> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180512025833.22998-1-ricardo.martincoski@gmail.com> References: <20180512025833.22998-1-ricardo.martincoski@gmail.com> In-Reply-To: <20180429143349.24010-1-ricardo.martincoski@gmail.com> References: <20180429143349.24010-1-ricardo.martincoski@gmail.com> Subject: [Buildroot] [PATCH v5 06/10] testing/tests/download: test git branch X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Ricardo Martincoski , Thomas Petazzoni , Luca Ceresoli , "Yann E . MORIN" , Ricardo Martincoski MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a branch to the static repo and check on the git refs test case the download of a git package: - with a sha1 reachable by a branch name, but not pointed by it, as version. This is the most common use case for git refs in the tree; - with a partial sha1 of a commit reachable by a branch as version; - with a sha1 of the commit head of a branch as version; - with a partial sha1 of the commit head of a branch as version; Enforce the download always occurs by removing the BR2_DL_DIR used for the tarballs generated by the git download infra. Signed-off-by: Ricardo Martincoski Cc: Arnout Vandecappelle --- Layout of static repo with the series applied until this patch: $ git -C support/testing/tests/download/git-remote/repo.git \ log --all --decorate --graph --oneline --decorate * 68c197d (mybranch) branch2 * 3174063 branch1 * a238b1d (HEAD -> master) initial Changes v4 -> v5: - do not test a named branch, Buildroot does not support it; Changes v3 -> v4: - no functional changes; - fix old comment on the code; Changes v2 -> v3: - complete rewrite using a static repo; --- .../git-partial-sha1-branch-head.hash | 2 ++ .../git-partial-sha1-branch-head.mk | 11 +++++++++++ .../git-partial-sha1-reachable-by-branch.hash | 2 ++ .../git-partial-sha1-reachable-by-branch.mk | 11 +++++++++++ .../git-sha1-branch-head.hash | 2 ++ .../git-sha1-branch-head/git-sha1-branch-head.mk | 11 +++++++++++ .../git-sha1-reachable-by-branch.hash | 2 ++ .../git-sha1-reachable-by-branch.mk | 11 +++++++++++ .../11/93ff46343f4f6a0522e2b28b871e905178c1f0 | Bin 0 -> 23 bytes .../31/7406308d9259e2231bd0d6ddad3de3832bce08 | Bin 0 -> 182 bytes .../34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 | Bin 0 -> 23 bytes .../68/c197d0879d485f4f6cee85544722b79e68e59f | Bin 0 -> 184 bytes .../b2/4b387624edc78d0292a127c43cad9ba97c6232 | Bin 0 -> 49 bytes .../e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e | Bin 0 -> 49 bytes .../git-remote/repo.git/refs/heads/mybranch | 1 + support/testing/tests/download/test_git.py | 11 ++++++++++- 16 files changed, 63 insertions(+), 1 deletion(-) create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash create mode 100644 support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk create mode 100644 support/testing/tests/download/git-remote/repo.git/objects/11/93ff46343f4f6a0522e2b28b871e905178c1f0 create mode 100644 support/testing/tests/download/git-remote/repo.git/objects/31/7406308d9259e2231bd0d6ddad3de3832bce08 create mode 100644 support/testing/tests/download/git-remote/repo.git/objects/34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 create mode 100644 support/testing/tests/download/git-remote/repo.git/objects/68/c197d0879d485f4f6cee85544722b79e68e59f create mode 100644 support/testing/tests/download/git-remote/repo.git/objects/b2/4b387624edc78d0292a127c43cad9ba97c6232 create mode 100644 support/testing/tests/download/git-remote/repo.git/objects/e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e create mode 100644 support/testing/tests/download/git-remote/repo.git/refs/heads/mybranch diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash new file mode 100644 index 0000000000..648bcceca0 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.hash @@ -0,0 +1,2 @@ +sha256 70b76187369e47db69dac02c5696e63b35199cd20490fa473d289dd377774613 git-partial-sha1-branch-head-68c197d0879d485f4f6c.tar.gz +sha256 2c1126513651b0d346a4e6d1bb75ac1c9999217e18026302d27bea47b06c7fb2 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk new file mode 100644 index 0000000000..6d4177c5bf --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-branch-head/git-partial-sha1-branch-head.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-branch-head +# +################################################################################ + +GIT_PARTIAL_SHA1_BRANCH_HEAD_VERSION = 68c197d0879d485f4f6c +GIT_PARTIAL_SHA1_BRANCH_HEAD_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_BRANCH_HEAD_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash new file mode 100644 index 0000000000..d064362e2c --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.hash @@ -0,0 +1,2 @@ +sha256 9db079b9e215799d59975db7b2b26671eff1932ee6cf1075296f2ace3e2cb746 git-partial-sha1-reachable-by-branch-317406308d9259e2231b.tar.gz +sha256 fabbc65c442bacb5e69b7adfea6d14fbbfc1327134322efd12771dc84387d507 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk new file mode 100644 index 0000000000..2f65b5c9a9 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-partial-sha1-reachable-by-branch/git-partial-sha1-reachable-by-branch.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-partial-sha1-reachable-by-branch +# +################################################################################ + +GIT_PARTIAL_SHA1_REACHABLE_BY_BRANCH_VERSION = 317406308d9259e2231b +GIT_PARTIAL_SHA1_REACHABLE_BY_BRANCH_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_PARTIAL_SHA1_REACHABLE_BY_BRANCH_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash new file mode 100644 index 0000000000..3e8f76d31a --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.hash @@ -0,0 +1,2 @@ +sha256 a21a2507b6d94ad484e49e3a9ae698f672a57469aab8e1779da77df7c9d4d337 git-sha1-branch-head-68c197d0879d485f4f6cee85544722b79e68e59f.tar.gz +sha256 2c1126513651b0d346a4e6d1bb75ac1c9999217e18026302d27bea47b06c7fb2 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk new file mode 100644 index 0000000000..d3ecaa8593 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-branch-head/git-sha1-branch-head.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-branch-head +# +################################################################################ + +GIT_SHA1_BRANCH_HEAD_VERSION = 68c197d0879d485f4f6cee85544722b79e68e59f +GIT_SHA1_BRANCH_HEAD_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_BRANCH_HEAD_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash new file mode 100644 index 0000000000..f8d7b5dc48 --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.hash @@ -0,0 +1,2 @@ +sha256 8909e76d898e651af0bc23fae4103b87888bfe77448d71aaf1fbec3da97a3ce2 git-sha1-reachable-by-branch-317406308d9259e2231bd0d6ddad3de3832bce08.tar.gz +sha256 fabbc65c442bacb5e69b7adfea6d14fbbfc1327134322efd12771dc84387d507 file diff --git a/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk new file mode 100644 index 0000000000..badf9e13ca --- /dev/null +++ b/support/testing/tests/download/br2-external/git-refs/package/git-sha1-reachable-by-branch/git-sha1-reachable-by-branch.mk @@ -0,0 +1,11 @@ +################################################################################ +# +# git-sha1-reachable-by-branch +# +################################################################################ + +GIT_SHA1_REACHABLE_BY_BRANCH_VERSION = 317406308d9259e2231bd0d6ddad3de3832bce08 +GIT_SHA1_REACHABLE_BY_BRANCH_SITE = git://localhost:$(GITREMOTE_PORT_NUMBER)/repo.git +GIT_SHA1_REACHABLE_BY_BRANCH_LICENSE_FILES = file + +$(eval $(generic-package)) diff --git a/support/testing/tests/download/git-remote/repo.git/objects/11/93ff46343f4f6a0522e2b28b871e905178c1f0 b/support/testing/tests/download/git-remote/repo.git/objects/11/93ff46343f4f6a0522e2b28b871e905178c1f0 new file mode 100644 index 0000000000000000000000000000000000000000..3541cd14f0bf5f3a172f868c7ec730dcc255ebd2 GIT binary patch literal 23 fcmbAT(SQY{RanuOb literal 0 HcmV?d00001 diff --git a/support/testing/tests/download/git-remote/repo.git/objects/31/7406308d9259e2231bd0d6ddad3de3832bce08 b/support/testing/tests/download/git-remote/repo.git/objects/31/7406308d9259e2231bd0d6ddad3de3832bce08 new file mode 100644 index 0000000000000000000000000000000000000000..c2c986572a7dec5f263e461155a09124d0f05844 GIT binary patch literal 182 zcmV;n07?IN0j#-;9k=lnv036+FLBVg-+p;}q4*8`RGo_IA)Vnl;DdW7doD k#;AurrYHYXPL%;0UaV55dfu3pF0z#G*T2lF9~m)jQ^MU{p#T5? literal 0 HcmV?d00001 diff --git a/support/testing/tests/download/git-remote/repo.git/objects/34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 b/support/testing/tests/download/git-remote/repo.git/objects/34/d1da713bf7de1c535e1d7d3ca985afd84bc7e5 new file mode 100644 index 0000000000000000000000000000000000000000..29f2d4fd004afa03b43e3148207e258e7aa9fc41 GIT binary patch literal 23 fcmbAT3SQY^Qam@(V literal 0 HcmV?d00001 diff --git a/support/testing/tests/download/git-remote/repo.git/objects/68/c197d0879d485f4f6cee85544722b79e68e59f b/support/testing/tests/download/git-remote/repo.git/objects/68/c197d0879d485f4f6cee85544722b79e68e59f new file mode 100644 index 0000000000000000000000000000000000000000..3e421bb97a40ab93592d94107f3a1258a99b76fa GIT binary patch literal 184 zcmV;p07w6L0j;n literal 0 HcmV?d00001 diff --git a/support/testing/tests/download/git-remote/repo.git/objects/b2/4b387624edc78d0292a127c43cad9ba97c6232 b/support/testing/tests/download/git-remote/repo.git/objects/b2/4b387624edc78d0292a127c43cad9ba97c6232 new file mode 100644 index 0000000000000000000000000000000000000000..20491e3f176096db13c0b0c7857406e1c4119619 GIT binary patch literal 49 zcmV-10M7q-0V^p=O;s>9VlXr?Ff%bxNXyJgWiYvTtI+!UJ(=J**;<>Gt?O@iAAbq} H3k46<$LbTr literal 0 HcmV?d00001 diff --git a/support/testing/tests/download/git-remote/repo.git/objects/e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e b/support/testing/tests/download/git-remote/repo.git/objects/e2/cfe068f7e5bf4de32ffe1241da53abce9fa89e new file mode 100644 index 0000000000000000000000000000000000000000..57be6485778c7f743a82f71ef718103cecfd4f35 GIT binary patch literal 49 zcmb