diff options
| author | aur-build <aur-build@localhost> | 2026-11-17 21:30:38 +0000 |
|---|---|---|
| committer | aur-build <aur-build@localhost> | 2026-11-17 21:30:38 +0000 |
| commit | a6f69962e85ccf0f0cfd86f7c85bf0f9a2c8c09e (patch) | |
| tree | d86bc97c0da59ffe56f41c9dc8edc1ae21d19a5a /testcorpus/downgrade/PKGBUILD | |
| parent | f586d11f6a1711145ba4804787217a1bab58751d (diff) | |
| download | aur-build-a6f69962e85ccf0f0cfd86f7c85bf0f9a2c8c09e.tar.gz aur-build-a6f69962e85ccf0f0cfd86f7c85bf0f9a2c8c09e.zip | |
test: toolchain shims and the fake-package corpus (§16a)
The harness that makes the rest of this developable. Six real binaries
named exactly like the tools the pipeline shells out to, sharing one
shim module, driven entirely by environment so no production code path
is test-only:
AUR_SHIM_DIR where invocations are recorded (jsonl)
AUR_SHIM_MANIFEST the fixture manifest to obey
AUR_SHIM_FAIL optional tool forced to fail
makechrootpkg emits real .pkg.tar.zst files with .PKGINFO and
.BUILDINFO (the full chroot world, which is why §10.1 filters it),
makepkg answers --printsrcinfo and --vercheck for Stage B, repo-add
rebuilds a gzip'd .db with %FILENAME%/%VERSION%/%SHA256SUM% DESC
entries, gpg writes a detached signature, mkarchroot creates a warm
root. Each one records its invocation so tests assert on what actually
ran.
testcorpus/ holds 17 fixtures, each a PKGBUILD plus a manifest with the
scripted outcome: plain-make, with-patch, install-hooks, skip-checksum,
split-pkgbase, build-fails, check-fails, missing-dep, dep-cycle,
epoch-bump, pkgrel-reset, downgrade, digest-drift, pin-drift,
git-sourced, git-submodules, unresolvable. The harness commits a fixture
into a real git repo standing in for AUR, materialises a local upstream
git repo for VCS fixtures, and swaps payload bytes for the drift cases.
Config.child_env is what puts the shims on PATH for child processes, so
the pipeline runs completely unmodified under test.
Part of P0 (DESIGN.md §17).
Diffstat (limited to 'testcorpus/downgrade/PKGBUILD')
| -rw-r--r-- | testcorpus/downgrade/PKGBUILD | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/testcorpus/downgrade/PKGBUILD b/testcorpus/downgrade/PKGBUILD new file mode 100644 index 0000000..7562a41 --- /dev/null +++ b/testcorpus/downgrade/PKGBUILD @@ -0,0 +1,13 @@ +pkgbase=downgrade +pkgver=2.0 +pkgrel=1 +pkgdesc="synthetic fixture" +url="https://example.invalid/downgrade" +license=(MIT) +arch=(x86_64) +build() { + echo building downgrade +} +package_downgrade() { + echo packaging downgrade +} |
