<feed xmlns='http://www.w3.org/2005/Atom'>
<title>tools/git-repo.git/tests/e2e, branch stable</title>
<subtitle>Mirror of gerrit.googlesource.com/git-repo</subtitle>
<id>https://git.enea.com/cgit/tools/git-repo.git/atom?h=stable</id>
<link rel='self' href='https://git.enea.com/cgit/tools/git-repo.git/atom?h=stable'/>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/'/>
<updated>2026-10-26T20:52:54+00:00</updated>
<entry>
<title>tests: e2e: add tests for more `repo init` options</title>
<updated>2026-10-26T20:52:54+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=e3e8e8a3b0509db51ef42c46412af2c59b17db95'/>
<id>urn:sha1:e3e8e8a3b0509db51ef42c46412af2c59b17db95</id>
<content type='text'>
Cover `--reference` from a local mirror (with &amp; without `--dissociate`),
`--standalone-manifest` with a manifest file served over HTTP, and
`--manifest-depth`.

Teach the server to serve static files (`GitHost.publish_file`), let
`manifest_xml` take an absolute `fetch` URL, and add `move_aside` to
make git dirs disappear mid-test (deleting them fails on Windows).

Bug: 566270944
Change-Id: Id60a19613a627f76d8d9125570dd5ce0cdfff9aa
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648549
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add tests for sync failures</title>
<updated>2026-10-26T20:52:43+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=cad9f591a481e839d3698ac505e7e7d9372926cd'/>
<id>urn:sha1:cad9f591a481e839d3698ac505e7e7d9372926cd</id>
<content type='text'>
Cover projects missing on the server (incl. `--fail-fast`), missing
project &amp; manifest revisions, and local changes that conflict with an
incoming change.  The tests check that repo exits non-zero with a useful
error, leaves the rest of the tree usable, and recovers once the problem
is fixed.

Let `RepoClient.init` return failures instead of raising.

Bug: 566270944
Change-Id: I84e2b8c0bb6012678add77360b446d4bea010c78
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648548
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add tests for manifest groups</title>
<updated>2026-10-26T20:52:38+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:41+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=24197b8ae194db59d1425eabe49256498373b22d'/>
<id>urn:sha1:24197b8ae194db59d1425eabe49256498373b22d</id>
<content type='text'>
Cover re-running `repo init -g` to add &amp; remove projects,
`&lt;include groups=...&gt;`, `platform-*` groups &amp; `--platform`, and groups
combined with a superproject.

Let `RepoClient.list_projects` pass args to `repo list`.

Bug: 566270944
Change-Id: Id333078fd18d38962d8b725ae9bd87f4976c3112
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648547
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add tests for partial clones &amp; the Android setup</title>
<updated>2026-10-26T20:00:28+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=bfb9869b89387556d9ebccd6d4a628d670f2fa29'/>
<id>urn:sha1:bfb9869b89387556d9ebccd6d4a628d670f2fa29</id>
<content type='text'>
Cover the go/repo-init flags used across Android (superproject, `-c`,
`--partial-clone`, `--partial-clone-exclude` &amp; `--clone-filter`)
followed by the go/sync flags, under Git 2 &amp; Git 3 defaults: projects
are pinned to the superproject, filtered blobs stay on the server,
excluded projects are full clones, and incremental syncs skip projects
whose pin didn't move.  Also cover the default filter, and `sync -n`
then `sync -l` with a partial clone (where `-l` has to fetch blobs on
demand).

Add harness helpers to read a checkout's git config, list the repos a
client contacted, and create blobs that only exist in history.

Bug: 566270944
Change-Id: I77d2cabc1d4f5db2ea139c7825ba87638c6db1e7
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648546
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add tests for network-only &amp; local-only syncs</title>
<updated>2026-10-26T19:57:09+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:40+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=887f9a901467c5fa74706439e23a3814c2711bdf'/>
<id>urn:sha1:887f9a901467c5fa74706439e23a3814c2711bdf</id>
<content type='text'>
Cover `repo sync -n` &amp; `-l` on existing checkouts (interleaved &amp;
phased), projects that were never fetched, and two-phase syncs with a
superproject.  `-l` must not touch the network, which the tests check by
taking the server offline.  Also cover tags (`--no-tags` &amp; `sync-tags`),
`--prune`, `--force-sync`, `--force-remove-dirty` &amp; `-d`.

Teach the harness to simulate outages (`GitHost.offline`) and to collect
the requests made during a block (`GitHost.watch_requests`), and add a
few `RepoClient` helpers.

Bug: 566270944
Change-Id: I96b4729a7d4e5b58bc57fb46a060beda35549979
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648545
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add tests for init, sync &amp; common workflows</title>
<updated>2026-10-26T19:53:32+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=dc1811ba23e3f8763566935cbdc32b04b74c0543'/>
<id>urn:sha1:dc1811ba23e3f8763566935cbdc32b04b74c0543</id>
<content type='text'>
Cover the core `repo init` &amp; `repo sync` options (current branch only,
clone bundles, shallow clones, groups, local manifests &amp; manifest
names), multi-step workflows (two-phase syncs, mirrors, incremental
syncs, local work, switching manifest branches, selfupdate, ...), and
manifests that broke users in the past.  Some tests also run under Git 3
defaults.

Add `RepoClient` helpers to list remote-tracking branches &amp; checkouts,
and document the test layout in the README.

Bug: 566270944
Change-Id: Iac333216e0f27e489e64f4eb853189f860a91f20
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648544
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: fix harness on Windows, CI &amp; inside git checkouts</title>
<updated>2026-10-26T19:50:26+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-23T01:57:39+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=9aac80dafc1e54e90a46d3707a1d627f3cb0cf13'/>
<id>urn:sha1:9aac80dafc1e54e90a46d3707a1d627f3cb0cf13</id>
<content type='text'>
Normalize the `\r\n` that Python on Windows writes to pipes in repo's
output so tests can match multi-line messages.  Pass a str to
`os.readlink`, which only accepts Path objects on Windows since Python
3.8.  Set `GIT_CEILING_DIRECTORIES` for the client so git never finds a
repo above the test dir (e.g. when running with `--basetemp=./tmp` from
a checkout).

Run the real git rather than a `git` wrapper that's first on PATH: the
real git's exec dir (from `git --exec-path`) has a copy of git, so put
it first on PATH.  LUCI's wrapper, for one, retries server errors for
minutes, which hangs tests that simulate them.

Bug: 566270944
Change-Id: Ia0ed5285852638e533632a7272f154239f1e834f
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648543
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add pytest fixtures &amp; `e2e` marker</title>
<updated>2026-10-22T23:43:23+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-22T15:36:06+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=4212588c2040e0deee26ed97a1d1491a978b79f6'/>
<id>urn:sha1:4212588c2040e0deee26ed97a1d1491a978b79f6</id>
<content type='text'>
Add tests/e2e/conftest.py with fixtures for writing end-to-end tests: a
session-wide git server, the published code under test, a per-test
namespace of server repos, and a repo client with an isolated HOME &amp;
git config.  Parametrize `git_defaults` to emulate Git 3 defaults
(reftable &amp; `main` as the default branch) on older git.

Tests under tests/e2e/ are marked `e2e` and run after the unit tests in
`./run_tests`.  Use `-m e2e` or `-m 'not e2e'` to select them.  They're
skipped when `git http-backend` is unavailable, git is older than 2.28,
or not running from a git checkout.

Bug: 566270944
Change-Id: Ib61e4dd7acc41a65beec4d74f1635a25dce4e3be
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647643
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add a client to run repo against the local server</title>
<updated>2026-10-22T23:43:19+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-22T15:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=be06f8dd012bf674b049300aee8258daa4405733'/>
<id>urn:sha1:be06f8dd012bf674b049300aee8258daa4405733</id>
<content type='text'>
Add `RepoClient`, which runs a standalone copy of the `repo` launcher as
a subprocess the same way end users do, and `publish_repo_source`, which
publishes the code under test (the current checkout, including
uncommitted changes) as a repo on the server so `repo init` installs it
into .repo/repo/ over HTTP.

Also add `GIT_DEFAULTS` so tests can emulate Git 3 defaults (reftable &amp;
`main` as the default branch) on older git.

Bug: 566270944
Change-Id: I01ef53362b7812f4cb3e012509350980413cf0a8

Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647505
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
</content>
</entry>
<entry>
<title>tests: e2e: add a local smart HTTP git server</title>
<updated>2026-10-22T23:43:14+00:00</updated>
<author>
<name>Brian Gan</name>
<email>brgan@google.com</email>
</author>
<published>2026-10-22T15:36:05+00:00</published>
<link rel='alternate' type='text/html' href='https://git.enea.com/cgit/tools/git-repo.git/commit/?id=74d887ea8672198e43aafd1e0969341919bde8cd'/>
<id>urn:sha1:74d887ea8672198e43aafd1e0969341919bde8cd</id>
<content type='text'>
Add `GitHttpServer`, which serves the bare repositories under a
directory over smart HTTP by running `git http-backend` behind a small
threaded HTTP server on 127.0.0.1.  Like Gerrit/GoB, it also serves
static `&lt;repo&gt;/clone.bundle` files.  It records the requests it receives
so tests can check what clients fetched.

Add `GitHost`, which gives each test its own namespace of repos on a
shared server, with helpers to create &amp; update a manifest repo.

Bug: 566270944
Change-Id: I35ff0b9ae743ed7a8d3c775525986e662ef03de0

Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/647504
Reviewed-by: Gavin Mak &lt;gavinmak@google.com&gt;
Tested-by: Brian Gan &lt;brgan@google.com&gt;
Commit-Queue: Brian Gan &lt;brgan@google.com&gt;
</content>
</entry>
</feed>
