Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 16 additions & 17 deletions .github/workflows/t9-suite.yml → .github/workflows/t-suite.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,13 @@
name: t9 Suite
name: t Suite

# The t/ integration tests had no CI job at all: ci.yml's `select` skips its
# jobs for a diff that only touches t/, and nothing invoked the test-subdir
# task. That blind spot let t9014, t90010 and a t9007 assertion sit broken for
# jobs for a diff that only touches t/, and nothing invoked the task that runs
# them. That blind spot let t9014, t90010 and a t9007 assertion sit broken for
# months. This workflow is deliberately ungated — it runs on every pull
# request, like js-build.yml — so the suite cannot go dark again.
#
# It runs the whole t/ tree, not one range: t0xxx went uncovered for the same
# structural reason t9 did, and a filter here is exactly how that happens.

on:
push:
Expand All @@ -17,7 +20,7 @@ permissions:
contents: read

jobs:
t9-suite:
t-suite:
runs-on: ubuntu-latest
timeout-minutes: 90
steps:
Expand Down Expand Up @@ -46,16 +49,12 @@ jobs:
- name: Moon update
run: moon update

# t/test-lib.sh sets no identity of its own, and several tests commit
# without configuring one per repository, so they rely on a global it
# never establishes. Without this the suite dies on "unable to
# auto-detect email address".
- name: Configure git identity
run: |
git config --global user.name "Bit Test"
git config --global user.email "test@example.com"

# Builds the release binary at the path t/test-lib.sh looks for, via the
# test-subdir task's build dependency.
- name: Run t9 suite
run: pkf run test-subdir
# No `git config --global user.name/user.email` step: t/test-lib.sh and
# t/test-lib-e2e.sh each point HOME at their own trash directory and
# establish an identity of their own, so the suite no longer depends on
# the runner's git configuration.

# Builds the release binary at the path the test libs look for, via the
# test-t task's build dependency.
- name: Run t/ suite
run: pkf run test-t
16 changes: 8 additions & 8 deletions Taskfile.pkl
Original file line number Diff line number Diff line change
Expand Up @@ -330,13 +330,13 @@ local e2e: Task = new {
cmd = "bash e2e/run-tests.sh"
}

local testSubdir: Task = new {
name = "test-subdir"
description = "t9 integration tests: subdir clone/push, workspace, transports"
// The filter is a substring match, so `t9` covers the whole t9 range in one
// pass — `t900` alone skipped t9011-t9021, which is how several of these
// tests stayed broken unnoticed.
cmd = "bash t/run-tests.sh t9"
local testT: Task = new {
name = "test-t"
description = "All t/ integration tests (t0 core, t1/t3/t7, t9 subdir/workspace/transport)"
// No filter: every t/ range runs. A filter is how these tests went dark
// before — `t900` skipped t9011-t9021, and widening it to `t9` still left
// the 30 t0xxx files with no CI job at all.
cmd = "bash t/run-tests.sh"
deps { build }
}

Expand Down Expand Up @@ -717,7 +717,7 @@ tasks {
buildPagesDemo

e2e
testSubdir
testT
testDistributed
testAi

Expand Down
2 changes: 1 addition & 1 deletion docs/git-compatibility.md
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ Full upstream run (`pkf run git-t`) summary on macOS (2026-02-07):
- `pkf run check`: pass
- `pkf run test`: pass (`js/lib 215 pass`, `native 811 pass`)
- `pkf run e2e` (`t/run-tests.sh t00`): pass
- `pkf run test-subdir` (`t/run-tests.sh t900`): pass
- `pkf run test-t` (`t/run-tests.sh`, all 63 files): pass
- `pkf run git-t-allowlist`: pass (`success 24,279 / failed 0 / broken 177`)

## Performance Snapshot (2026-02-12)
Expand Down
2 changes: 1 addition & 1 deletion t/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ This directory contains shell-based integration tests for bit, following the Git
## Running Tests

```bash
# Run all tests
# Run all tests (this is what the t-suite CI job runs, via `pkf run test-t`)
./t/run-tests.sh

# Run legacy e2e subset (t00xx)
Expand Down
19 changes: 19 additions & 0 deletions t/test-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,25 @@ rm -rf "$TRASH_DIRECTORY"
mkdir -p "$TRASH_DIRECTORY"
cd "$TRASH_DIRECTORY" || exit 1

# Give the suite its own git identity instead of borrowing whoever is running
# it. Several tests commit without configuring one per repository, so on a
# machine with no global identity — a fresh runner, a container — they died
# with "unable to auto-detect email address".
#
# This writes a global config under a private HOME rather than exporting
# GIT_AUTHOR_* / GIT_COMMITTER_*: those env vars outrank repository config,
# and would silently override the many tests that set `git config user.email`
# in their own repositories. A global file keeps the normal precedence, so a
# per-repository setting still wins. Pointing HOME here also stops the
# developer's real ~/.gitconfig from leaking into a run.
HOME="$TRASH_DIRECTORY"
export HOME
cat >"$TRASH_DIRECTORY/.gitconfig" <<-EOF
[user]
name = Bit Test
email = test@example.com
EOF

# Cleanup on exit
cleanup() {
cd "$TEST_DIRECTORY" || exit 1
Expand Down
Loading