From 7455ae29aaa835041f236435e0594f55beae594b Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sun, 23 Aug 2026 20:18:29 -1000 Subject: Renumber the test scripts into themed ranges The numbering walks outward from the ground the suite stands on. - t000x for the git version, html validity and the cache - t01xx for page content, one script per page - t02xx for filters, submodule links, dates and limits, which cut across pages - t03xx for defence, the security regressions and the $HOME promise - t04xx for the helper tools under tools/ --- tests/t0001-validate-git-versions.sh | 53 ------------------------------------ 1 file changed, 53 deletions(-) delete mode 100755 tests/t0001-validate-git-versions.sh (limited to 'tests/t0001-validate-git-versions.sh') diff --git a/tests/t0001-validate-git-versions.sh b/tests/t0001-validate-git-versions.sh deleted file mode 100755 index 2117764..0000000 --- a/tests/t0001-validate-git-versions.sh +++ /dev/null @@ -1,53 +0,0 @@ -#!/bin/sh - -# Checks that the Git version cgit says it is built for is the one it is -# actually built against. The top-level Makefile names a version, the tree -# under vendor/git records its own, and the submodule is pinned to a tag, so -# all three have to agree or cgit is being built on something other than what -# it claims. Set CGIT_TEST_NO_GIT_VERSION to YesPlease when Git comes from -# elsewhere and the comparison has nothing to say. - -if [ "${CGIT_TEST_NO_GIT_VERSION}" = "YesPlease" ]; then - exit 0 -fi - -test_description='Check Git version is correct' -CGIT_TEST_NO_CREATE_REPOS=YesPlease -. ./setup.sh - -test_expect_success 'extract Git version from Makefile' ' - sed -n -e "/^GIT_VERSION[ ]*=/ { - s/^GIT_VERSION[ ]*=[ ]*// - p - }" ../../Makefile >makefile_version -' - -# Git's GIT-VERSION-GEN script applies "s/-/./g" to the version string on its -# way into the GIT-VERSION-FILE, so the same has to be done to the version in -# the Makefile before the two can be compared. -test_expect_success 'test Git version matches Makefile' ' - ( cat ../../vendor/git/GIT-VERSION-FILE || echo "No GIT-VERSION-FILE" ) | - sed -e "s/GIT_VERSION[ ]*=[ ]*//" -e "s/\\.dirty$//" >git_version && - sed -e "s/-/./g" makefile_version >makefile_git_version && - test_cmp git_version makefile_git_version -' - -# A tree unpacked from a tarball has no submodule pin to describe, so there is -# nothing to compare against and the test says so rather than failing. -test_expect_success 'test submodule version matches Makefile' ' - if ! test -e ../../vendor/git/.git - then - echo "vendor/git/ is not a Git repository" >&2 - else - ( - cd ../.. && - submodule_oid=$(git ls-files --stage -- vendor/git | - sed -e "s/^[0-9]* \\([0-9a-f]*\\) [0-9] .*$/\\1/") && - cd vendor/git && - git describe --match "v[0-9]*" $submodule_oid - ) | sed -e "s/^v//" -e "s/-/./" >submodule_version && - test_cmp submodule_version makefile_version - fi -' - -test_done -- cgit 2.12.1