From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <gentoo-commits+bounces-1641798-garchives=archives.gentoo.org@lists.gentoo.org> Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 104F115817D for <garchives@archives.gentoo.org>; Wed, 12 Jun 2024 15:35:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5A0DDE2B46; Wed, 12 Jun 2024 15:35:38 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 32327E2B46 for <gentoo-commits@lists.gentoo.org>; Wed, 12 Jun 2024 15:35:38 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 750A1335CB4 for <gentoo-commits@lists.gentoo.org>; Wed, 12 Jun 2024 15:35:37 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 0E7F8119 for <gentoo-commits@lists.gentoo.org>; Wed, 12 Jun 2024 15:35:36 +0000 (UTC) From: "Michał Górny" <mgorny@gentoo.org> To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michał Górny" <mgorny@gentoo.org> Message-ID: <1718206531.2a7763a875ff6f4a74b6c40c0238a50febcfafab.mgorny@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: eclass/tests/ X-VCS-Repository: repo/gentoo X-VCS-Files: eclass/tests/git-r3.sh X-VCS-Directories: eclass/tests/ X-VCS-Committer: mgorny X-VCS-Committer-Name: Michał Górny X-VCS-Revision: 2a7763a875ff6f4a74b6c40c0238a50febcfafab X-VCS-Branch: master Date: Wed, 12 Jun 2024 15:35:36 +0000 (UTC) Precedence: bulk List-Post: <mailto:gentoo-commits@lists.gentoo.org> List-Help: <mailto:gentoo-commits+help@lists.gentoo.org> List-Unsubscribe: <mailto:gentoo-commits+unsubscribe@lists.gentoo.org> List-Subscribe: <mailto:gentoo-commits+subscribe@lists.gentoo.org> List-Id: Gentoo Linux mail <gentoo-commits.gentoo.org> X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: f51d7e52-e216-49e1-9df8-35569a9310e4 X-Archives-Hash: 891d669eab1c51e1ceec397028fd3d48 commit: 2a7763a875ff6f4a74b6c40c0238a50febcfafab Author: Michał Górny <mgorny <AT> gentoo <DOT> org> AuthorDate: Wed Jun 12 15:34:29 2024 +0000 Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> CommitDate: Wed Jun 12 15:35:31 2024 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2a7763a8 eclass/tests: Remove git-r3.sh Remove base git-r3 tests, they are broken for a long time and I can't figure out how to fix them properly. There is probably no point in testing these functions standalone anyway since they're extensively used by ebuilds. Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> eclass/tests/git-r3.sh | 208 ------------------------------------------------- 1 file changed, 208 deletions(-) diff --git a/eclass/tests/git-r3.sh b/eclass/tests/git-r3.sh deleted file mode 100755 index 02cbcbc59125..000000000000 --- a/eclass/tests/git-r3.sh +++ /dev/null @@ -1,208 +0,0 @@ -#!/bin/bash -# Copyright 1999-2019 Gentoo Authors -# Distributed under the terms of the GNU General Public License v2 - -# git no longer allows ext: protocol, meh -exit 0 - -EAPI=7 - -source tests-common.sh || exit - -inherit git-r3 - -testdir=${pkg_root}/git -mkdir "${testdir}" || die "unable to mkdir testdir" -cd "${testdir}" || die "unable to cd to testdir" - -EGIT3_STORE_DIR=store -mkdir "${EGIT3_STORE_DIR}" || die "unable to mkdir store" - -test_file() { - local fn=${1} - local expect=${2} - - if [[ ! -f ${fn} ]]; then - eerror "${fn} does not exist (not checked out?)" - else - local got=$(<"${fn}") - - if [[ ${got} != ${expect} ]]; then - eerror "${fn}, expected: ${expect}, got: ${got}" - else - return 0 - fi - fi - return 1 -} - -test_no_file() { - local fn=${1} - - if [[ -f ${fn} ]]; then - eerror "${fn} exists (wtf?!)" - else - return 0 - fi - return 1 -} - -test_repo_clean() { - local P=${P}_${FUNCNAME#test_} - - ( - mkdir repo - cd repo - git init -q - echo test > file - git add file - git commit -m 1 -q - echo other-text > file2 - git add file2 - git commit -m 2 -q - ) || die "unable to prepare repo" - - # we need to use an array to preserve whitespace - local EGIT_REPO_URI=( - "ext::git daemon --export-all --base-path=. --inetd %G/repo" - ) - - tbegin "fetching from a simple repo" - ( - git-r3_src_unpack - test_file "${WORKDIR}/${P}/file" test && \ - test_file "${WORKDIR}/${P}/file2" other-text - ) &>fetch.log - - eend ${?} || cat fetch.log -} - -test_repo_revert() { - local P=${P}_${FUNCNAME#test_} - - ( - cd repo - git revert -n HEAD^ - git commit -m r1 -q - ) || die "unable to prepare repo" - - # we need to use an array to preserve whitespace - local EGIT_REPO_URI=( - "ext::git daemon --export-all --base-path=. --inetd %G/repo" - ) - - tbegin "fetching revert" - ( - git-r3_src_unpack - test_no_file "${WORKDIR}/${P}/file" && \ - test_file "${WORKDIR}/${P}/file2" other-text - ) &>fetch.log - - eend ${?} || cat fetch.log -} - -test_repo_branch() { - local P=${P}_${FUNCNAME#test_} - - ( - cd repo - git branch -q other-branch HEAD^ - git checkout -q other-branch - echo one-more > file3 - git add file3 - git commit -m 3 -q - git checkout -q master - ) || die "unable to prepare repo" - - # we need to use an array to preserve whitespace - local EGIT_REPO_URI=( - "ext::git daemon --export-all --base-path=. --inetd %G/repo" - ) - local EGIT_BRANCH=other-branch - - tbegin "switching branches" - ( - git-r3_src_unpack - test_file "${WORKDIR}/${P}/file" test && \ - test_file "${WORKDIR}/${P}/file2" other-text && \ - test_file "${WORKDIR}/${P}/file3" one-more - ) &>fetch.log - - eend ${?} || cat fetch.log -} - -test_repo_merge() { - local P=${P}_${FUNCNAME#test_} - - ( - cd repo - git branch -q one-more-branch HEAD^ - git checkout -q one-more-branch - echo foobarbaz > file3 - git add file3 - git commit -m 3b -q - git checkout -q master - git merge -m 4 -q one-more-branch - ) || die "unable to prepare repo" - - # we need to use an array to preserve whitespace - local EGIT_REPO_URI=( - "ext::git daemon --export-all --base-path=. --inetd %G/repo" - ) - - tbegin "fetching a merge commit" - ( - git-r3_src_unpack - test_no_file "${WORKDIR}/${P}/file" && \ - test_file "${WORKDIR}/${P}/file2" other-text && \ - test_file "${WORKDIR}/${P}/file3" foobarbaz - ) &>fetch.log - - eend ${?} || cat fetch.log -} - -test_repo_revert_merge() { - local P=${P}_${FUNCNAME#test_} - - ( - cd repo - git branch -q to-be-reverted - git checkout -q to-be-reverted - echo trrm > file3 - git add file3 - git commit -m 5b -q - git checkout -q master - echo trrm > file2 - git add file2 - git commit -m 5 -q - git merge -m 6 -q to-be-reverted - echo trrm > file - git add file - git commit -m 7 -q - git revert -m 1 -n HEAD^ - git commit -m 7r -q - ) || die "unable to prepare repo" - - # we need to use an array to preserve whitespace - local EGIT_REPO_URI=( - "ext::git daemon --export-all --base-path=. --inetd %G/repo" - ) - - tbegin "fetching a revert of a merge commit" - ( - git-r3_src_unpack - test_file "${WORKDIR}/${P}/file" trrm && \ - test_file "${WORKDIR}/${P}/file2" trrm && \ - test_file "${WORKDIR}/${P}/file3" foobarbaz - ) &>fetch.log - - eend ${?} || cat fetch.log -} - -test_repo_clean -test_repo_revert -test_repo_branch -test_repo_merge -test_repo_revert_merge - -texit