summaryrefslogtreecommitdiffstats
path: root/testcorpus
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-17 21:30:38 +0000
committeraur-build <aur-build@localhost>2026-11-17 21:30:38 +0000
commita6f69962e85ccf0f0cfd86f7c85bf0f9a2c8c09e (patch)
treed86bc97c0da59ffe56f41c9dc8edc1ae21d19a5a /testcorpus
parentf586d11f6a1711145ba4804787217a1bab58751d (diff)
downloadaur-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')
-rw-r--r--testcorpus/build-fails/PKGBUILD13
-rw-r--r--testcorpus/build-fails/manifest.json31
-rw-r--r--testcorpus/check-fails/PKGBUILD14
-rw-r--r--testcorpus/check-fails/manifest.json30
-rw-r--r--testcorpus/dep-cycle/PKGBUILD14
-rw-r--r--testcorpus/dep-cycle/manifest.json36
-rw-r--r--testcorpus/digest-drift/PKGBUILD15
-rw-r--r--testcorpus/digest-drift/manifest.json30
-rw-r--r--testcorpus/digest-drift/payload.bin1
-rw-r--r--testcorpus/downgrade/PKGBUILD13
-rw-r--r--testcorpus/downgrade/manifest.json33
-rw-r--r--testcorpus/epoch-bump/PKGBUILD13
-rw-r--r--testcorpus/epoch-bump/manifest.json33
-rw-r--r--testcorpus/git-sourced/PKGBUILD19
-rw-r--r--testcorpus/git-sourced/manifest.json31
-rw-r--r--testcorpus/git-submodules/PKGBUILD15
-rw-r--r--testcorpus/git-submodules/manifest.json28
-rw-r--r--testcorpus/install-hooks/PKGBUILD14
-rw-r--r--testcorpus/install-hooks/install-hooks.install6
-rw-r--r--testcorpus/install-hooks/manifest.json30
-rw-r--r--testcorpus/missing-dep/PKGBUILD14
-rw-r--r--testcorpus/missing-dep/manifest.json41
-rw-r--r--testcorpus/pin-drift/PKGBUILD15
-rw-r--r--testcorpus/pin-drift/manifest.json31
-rw-r--r--testcorpus/pkgrel-reset/PKGBUILD13
-rw-r--r--testcorpus/pkgrel-reset/manifest.json33
-rw-r--r--testcorpus/plain-make/PKGBUILD13
-rw-r--r--testcorpus/plain-make/manifest.json33
-rw-r--r--testcorpus/skip-checksum/PKGBUILD15
-rw-r--r--testcorpus/skip-checksum/manifest.json32
-rw-r--r--testcorpus/skip-checksum/payload.bin1
-rw-r--r--testcorpus/split-pkgbase/PKGBUILD20
-rw-r--r--testcorpus/split-pkgbase/manifest.json35
-rw-r--r--testcorpus/unresolvable/PKGBUILD15
-rw-r--r--testcorpus/unresolvable/manifest.json30
-rw-r--r--testcorpus/with-patch/PKGBUILD15
-rw-r--r--testcorpus/with-patch/fix.patch5
-rw-r--r--testcorpus/with-patch/manifest.json30
38 files changed, 810 insertions, 0 deletions
diff --git a/testcorpus/build-fails/PKGBUILD b/testcorpus/build-fails/PKGBUILD
new file mode 100644
index 0000000..32fd553
--- /dev/null
+++ b/testcorpus/build-fails/PKGBUILD
@@ -0,0 +1,13 @@
+pkgbase=build-fails
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/build-fails"
+license=(MIT)
+arch=(x86_64)
+build() {
+ echo building build-fails
+}
+package_build-fails() {
+ echo packaging build-fails
+}
diff --git a/testcorpus/build-fails/manifest.json b/testcorpus/build-fails/manifest.json
new file mode 100644
index 0000000..844ce4c
--- /dev/null
+++ b/testcorpus/build-fails/manifest.json
@@ -0,0 +1,31 @@
+{
+ "name": "build-fails",
+ "build": "fail",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "build": "fail",
+ "retry": false
+ }
+}
diff --git a/testcorpus/check-fails/PKGBUILD b/testcorpus/check-fails/PKGBUILD
new file mode 100644
index 0000000..ccb3fe4
--- /dev/null
+++ b/testcorpus/check-fails/PKGBUILD
@@ -0,0 +1,14 @@
+pkgbase=check-fails
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/check-fails"
+license=(MIT)
+arch=(x86_64)
+checkdepends=(pytest)
+build() {
+ echo building check-fails
+}
+package_check-fails() {
+ echo packaging check-fails
+}
diff --git a/testcorpus/check-fails/manifest.json b/testcorpus/check-fails/manifest.json
new file mode 100644
index 0000000..5dd76e7
--- /dev/null
+++ b/testcorpus/check-fails/manifest.json
@@ -0,0 +1,30 @@
+{
+ "name": "check-fails",
+ "build": "check-fail",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "build": "check-fail"
+ }
+}
diff --git a/testcorpus/dep-cycle/PKGBUILD b/testcorpus/dep-cycle/PKGBUILD
new file mode 100644
index 0000000..452a467
--- /dev/null
+++ b/testcorpus/dep-cycle/PKGBUILD
@@ -0,0 +1,14 @@
+pkgbase=dep-cycle
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/dep-cycle"
+license=(MIT)
+arch=(x86_64)
+makedepends=(dep-cycle)
+build() {
+ echo building dep-cycle
+}
+package_dep-cycle() {
+ echo packaging dep-cycle
+}
diff --git a/testcorpus/dep-cycle/manifest.json b/testcorpus/dep-cycle/manifest.json
new file mode 100644
index 0000000..79dec4e
--- /dev/null
+++ b/testcorpus/dep-cycle/manifest.json
@@ -0,0 +1,36 @@
+{
+ "name": "dep-cycle",
+ "build": "succeed",
+ "sig": true,
+ "packages": [
+ {
+ "name": "dep-cycle",
+ "version": "1.0-1",
+ "arch": "x86_64",
+ "makedepends": [
+ "dep-cycle"
+ ]
+ }
+ ],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ]
+}
diff --git a/testcorpus/digest-drift/PKGBUILD b/testcorpus/digest-drift/PKGBUILD
new file mode 100644
index 0000000..444ff72
--- /dev/null
+++ b/testcorpus/digest-drift/PKGBUILD
@@ -0,0 +1,15 @@
+pkgbase=digest-drift
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/digest-drift"
+license=(MIT)
+arch=(x86_64)
+source=("@AUR_DIR@/payload.bin")
+sha256sums=("SKIP")
+build() {
+ echo building digest-drift
+}
+package_digest-drift() {
+ echo packaging digest-drift
+}
diff --git a/testcorpus/digest-drift/manifest.json b/testcorpus/digest-drift/manifest.json
new file mode 100644
index 0000000..46b4838
--- /dev/null
+++ b/testcorpus/digest-drift/manifest.json
@@ -0,0 +1,30 @@
+{
+ "name": "digest-drift",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "notes": "swap payload.bin bytes; expect integrity_alert"
+ }
+}
diff --git a/testcorpus/digest-drift/payload.bin b/testcorpus/digest-drift/payload.bin
new file mode 100644
index 0000000..cf16385
--- /dev/null
+++ b/testcorpus/digest-drift/payload.bin
@@ -0,0 +1 @@
+good release tarball
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
+}
diff --git a/testcorpus/downgrade/manifest.json b/testcorpus/downgrade/manifest.json
new file mode 100644
index 0000000..a85552e
--- /dev/null
+++ b/testcorpus/downgrade/manifest.json
@@ -0,0 +1,33 @@
+{
+ "name": "downgrade",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "bump": {
+ "pkgver": "1.0"
+ },
+ "notes": "maintainer reverted; flagged not blocked"
+ }
+}
diff --git a/testcorpus/epoch-bump/PKGBUILD b/testcorpus/epoch-bump/PKGBUILD
new file mode 100644
index 0000000..28875fe
--- /dev/null
+++ b/testcorpus/epoch-bump/PKGBUILD
@@ -0,0 +1,13 @@
+pkgbase=epoch-bump
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/epoch-bump"
+license=(MIT)
+arch=(x86_64)
+build() {
+ echo building epoch-bump
+}
+package_epoch-bump() {
+ echo packaging epoch-bump
+}
diff --git a/testcorpus/epoch-bump/manifest.json b/testcorpus/epoch-bump/manifest.json
new file mode 100644
index 0000000..e7ffb43
--- /dev/null
+++ b/testcorpus/epoch-bump/manifest.json
@@ -0,0 +1,33 @@
+{
+ "name": "epoch-bump",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "bump": {
+ "epoch": "1"
+ },
+ "notes": "epoch bump flagged"
+ }
+}
diff --git a/testcorpus/git-sourced/PKGBUILD b/testcorpus/git-sourced/PKGBUILD
new file mode 100644
index 0000000..ba9ae33
--- /dev/null
+++ b/testcorpus/git-sourced/PKGBUILD
@@ -0,0 +1,19 @@
+pkgbase=git-sourced
+pkgver=r1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/git-sourced"
+license=(MIT)
+arch=(x86_64)
+source=("git+file://@UPSTREAM_DIR@")
+sha256sums=("SKIP")
+build() {
+ echo building git-sourced
+}
+package_git-sourced() {
+ echo packaging git-sourced
+}
+pkgver() {
+ cd "$srcdir/upstream" 2>/dev/null || cd @UPSTREAM_DIR@
+ printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short HEAD)"
+}
diff --git a/testcorpus/git-sourced/manifest.json b/testcorpus/git-sourced/manifest.json
new file mode 100644
index 0000000..01a781f
--- /dev/null
+++ b/testcorpus/git-sourced/manifest.json
@@ -0,0 +1,31 @@
+{
+ "name": "git-sourced",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "vercheck": "r1.0-1",
+ "expect": {
+ "notes": "pkgver() derives from upstream HEAD"
+ }
+}
diff --git a/testcorpus/git-submodules/PKGBUILD b/testcorpus/git-submodules/PKGBUILD
new file mode 100644
index 0000000..6885cad
--- /dev/null
+++ b/testcorpus/git-submodules/PKGBUILD
@@ -0,0 +1,15 @@
+pkgbase=git-submodules
+pkgver=r1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/git-submodules"
+license=(MIT)
+arch=(x86_64)
+source=("git+file://@UPSTREAM_DIR@")
+sha256sums=("SKIP")
+build() {
+ echo building git-submodules
+}
+package_git-submodules() {
+ echo packaging git-submodules
+}
diff --git a/testcorpus/git-submodules/manifest.json b/testcorpus/git-submodules/manifest.json
new file mode 100644
index 0000000..6fd894a
--- /dev/null
+++ b/testcorpus/git-submodules/manifest.json
@@ -0,0 +1,28 @@
+{
+ "name": "git-submodules",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "vercheck": "r1.0-1"
+}
diff --git a/testcorpus/install-hooks/PKGBUILD b/testcorpus/install-hooks/PKGBUILD
new file mode 100644
index 0000000..149da79
--- /dev/null
+++ b/testcorpus/install-hooks/PKGBUILD
@@ -0,0 +1,14 @@
+pkgbase=install-hooks
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/install-hooks"
+license=(MIT)
+arch=(x86_64)
+install=install-hooks.install
+build() {
+ echo building install-hooks
+}
+package_install-hooks() {
+ echo packaging install-hooks
+}
diff --git a/testcorpus/install-hooks/install-hooks.install b/testcorpus/install-hooks/install-hooks.install
new file mode 100644
index 0000000..17a34be
--- /dev/null
+++ b/testcorpus/install-hooks/install-hooks.install
@@ -0,0 +1,6 @@
+post_install() {
+ echo "welcome"
+}
+pre_upgrade() {
+ echo "upgrading"
+}
diff --git a/testcorpus/install-hooks/manifest.json b/testcorpus/install-hooks/manifest.json
new file mode 100644
index 0000000..5ce0555
--- /dev/null
+++ b/testcorpus/install-hooks/manifest.json
@@ -0,0 +1,30 @@
+{
+ "name": "install-hooks",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "notes": "install hook delta panel"
+ }
+}
diff --git a/testcorpus/missing-dep/PKGBUILD b/testcorpus/missing-dep/PKGBUILD
new file mode 100644
index 0000000..5e75ee7
--- /dev/null
+++ b/testcorpus/missing-dep/PKGBUILD
@@ -0,0 +1,14 @@
+pkgbase=missing-dep
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/missing-dep"
+license=(MIT)
+arch=(x86_64)
+depends=(dep-partner)
+build() {
+ echo building missing-dep
+}
+package_missing-dep() {
+ echo packaging missing-dep
+}
diff --git a/testcorpus/missing-dep/manifest.json b/testcorpus/missing-dep/manifest.json
new file mode 100644
index 0000000..7d8d36a
--- /dev/null
+++ b/testcorpus/missing-dep/manifest.json
@@ -0,0 +1,41 @@
+{
+ "name": "missing-dep",
+ "build": "succeed",
+ "sig": true,
+ "packages": [
+ {
+ "name": "missing-dep",
+ "version": "1.0-1",
+ "arch": "x86_64",
+ "depends": [
+ "dep-partner"
+ ]
+ }
+ ],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "blocked_on": [
+ "dep-partner"
+ ]
+ }
+}
diff --git a/testcorpus/pin-drift/PKGBUILD b/testcorpus/pin-drift/PKGBUILD
new file mode 100644
index 0000000..5296ba4
--- /dev/null
+++ b/testcorpus/pin-drift/PKGBUILD
@@ -0,0 +1,15 @@
+pkgbase=pin-drift
+pkgver=r1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/pin-drift"
+license=(MIT)
+arch=(x86_64)
+source=("git+file://@UPSTREAM_DIR@")
+sha256sums=("SKIP")
+build() {
+ echo building pin-drift
+}
+package_pin-drift() {
+ echo packaging pin-drift
+}
diff --git a/testcorpus/pin-drift/manifest.json b/testcorpus/pin-drift/manifest.json
new file mode 100644
index 0000000..5db2b9c
--- /dev/null
+++ b/testcorpus/pin-drift/manifest.json
@@ -0,0 +1,31 @@
+{
+ "name": "pin-drift",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "vercheck": "r1.0-1",
+ "expect": {
+ "notes": "add a commit upstream; pkgver frozen"
+ }
+}
diff --git a/testcorpus/pkgrel-reset/PKGBUILD b/testcorpus/pkgrel-reset/PKGBUILD
new file mode 100644
index 0000000..75d9836
--- /dev/null
+++ b/testcorpus/pkgrel-reset/PKGBUILD
@@ -0,0 +1,13 @@
+pkgbase=pkgrel-reset
+pkgver=1.0
+pkgrel=7
+pkgdesc="synthetic fixture"
+url="https://example.invalid/pkgrel-reset"
+license=(MIT)
+arch=(x86_64)
+build() {
+ echo building pkgrel-reset
+}
+package_pkgrel-reset() {
+ echo packaging pkgrel-reset
+}
diff --git a/testcorpus/pkgrel-reset/manifest.json b/testcorpus/pkgrel-reset/manifest.json
new file mode 100644
index 0000000..3ce8ffc
--- /dev/null
+++ b/testcorpus/pkgrel-reset/manifest.json
@@ -0,0 +1,33 @@
+{
+ "name": "pkgrel-reset",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "bump": {
+ "pkgrel": "1"
+ },
+ "notes": "pkgrel reset is a major signal"
+ }
+}
diff --git a/testcorpus/plain-make/PKGBUILD b/testcorpus/plain-make/PKGBUILD
new file mode 100644
index 0000000..2da4fe2
--- /dev/null
+++ b/testcorpus/plain-make/PKGBUILD
@@ -0,0 +1,13 @@
+pkgbase=plain-make
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/plain-make"
+license=(MIT)
+arch=(x86_64)
+build() {
+ echo building plain-make
+}
+package_plain-make() {
+ echo packaging plain-make
+}
diff --git a/testcorpus/plain-make/manifest.json b/testcorpus/plain-make/manifest.json
new file mode 100644
index 0000000..5451fa8
--- /dev/null
+++ b/testcorpus/plain-make/manifest.json
@@ -0,0 +1,33 @@
+{
+ "name": "plain-make",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "build": "succeed",
+ "packages": [
+ "plain-make"
+ ]
+ }
+}
diff --git a/testcorpus/skip-checksum/PKGBUILD b/testcorpus/skip-checksum/PKGBUILD
new file mode 100644
index 0000000..93661a1
--- /dev/null
+++ b/testcorpus/skip-checksum/PKGBUILD
@@ -0,0 +1,15 @@
+pkgbase=skip-checksum
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/skip-checksum"
+license=(MIT)
+arch=(x86_64)
+source=("@AUR_DIR@/payload.bin")
+sha256sums=("SKIP")
+build() {
+ echo building skip-checksum
+}
+package_skip-checksum() {
+ echo packaging skip-checksum
+}
diff --git a/testcorpus/skip-checksum/manifest.json b/testcorpus/skip-checksum/manifest.json
new file mode 100644
index 0000000..0c56179
--- /dev/null
+++ b/testcorpus/skip-checksum/manifest.json
@@ -0,0 +1,32 @@
+{
+ "name": "skip-checksum",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "risk_signals": [
+ "skip-non-vcs"
+ ]
+ }
+}
diff --git a/testcorpus/skip-checksum/payload.bin b/testcorpus/skip-checksum/payload.bin
new file mode 100644
index 0000000..cd574fd
--- /dev/null
+++ b/testcorpus/skip-checksum/payload.bin
@@ -0,0 +1 @@
+the bytes that become the package
diff --git a/testcorpus/split-pkgbase/PKGBUILD b/testcorpus/split-pkgbase/PKGBUILD
new file mode 100644
index 0000000..416d817
--- /dev/null
+++ b/testcorpus/split-pkgbase/PKGBUILD
@@ -0,0 +1,20 @@
+pkgbase=split-pkgbase
+pkgname=(split-pkgbase split-pkgbase-docs split-pkgbase-lua)
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/split-pkgbase"
+license=(MIT)
+arch=(x86_64)
+build() {
+ echo building split-pkgbase
+}
+package_split-pkgbase() {
+ echo packaging split-pkgbase
+}
+package_split-pkgbase-docs() {
+ echo packaging split-pkgbase-docs
+}
+package_split-pkgbase-lua() {
+ echo packaging split-pkgbase-lua
+}
diff --git a/testcorpus/split-pkgbase/manifest.json b/testcorpus/split-pkgbase/manifest.json
new file mode 100644
index 0000000..864b74d
--- /dev/null
+++ b/testcorpus/split-pkgbase/manifest.json
@@ -0,0 +1,35 @@
+{
+ "name": "split-pkgbase",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "packages": [
+ "split-pkgbase",
+ "split-pkgbase-docs",
+ "split-pkgbase-lua"
+ ],
+ "notes": "one approval, three index rows"
+ }
+}
diff --git a/testcorpus/unresolvable/PKGBUILD b/testcorpus/unresolvable/PKGBUILD
new file mode 100644
index 0000000..3185435
--- /dev/null
+++ b/testcorpus/unresolvable/PKGBUILD
@@ -0,0 +1,15 @@
+pkgbase=unresolvable
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/unresolvable"
+license=(MIT)
+arch=(x86_64)
+source=("@AUR_DIR@/does-not-exist.tar.gz")
+sha256sums=("SKIP")
+build() {
+ echo building unresolvable
+}
+package_unresolvable() {
+ echo packaging unresolvable
+}
diff --git a/testcorpus/unresolvable/manifest.json b/testcorpus/unresolvable/manifest.json
new file mode 100644
index 0000000..1d7a229
--- /dev/null
+++ b/testcorpus/unresolvable/manifest.json
@@ -0,0 +1,30 @@
+{
+ "name": "unresolvable",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "notes": "source missing -> blocked"
+ }
+}
diff --git a/testcorpus/with-patch/PKGBUILD b/testcorpus/with-patch/PKGBUILD
new file mode 100644
index 0000000..c4246a9
--- /dev/null
+++ b/testcorpus/with-patch/PKGBUILD
@@ -0,0 +1,15 @@
+pkgbase=with-patch
+pkgver=1.0
+pkgrel=1
+pkgdesc="synthetic fixture"
+url="https://example.invalid/with-patch"
+license=(MIT)
+arch=(x86_64)
+source=("fix.patch")
+sha256sums=("SKIP")
+build() {
+ echo building with-patch
+}
+package_with-patch() {
+ echo packaging with-patch
+}
diff --git a/testcorpus/with-patch/fix.patch b/testcorpus/with-patch/fix.patch
new file mode 100644
index 0000000..128d5b6
--- /dev/null
+++ b/testcorpus/with-patch/fix.patch
@@ -0,0 +1,5 @@
+--- a/src/main.c
++++ b/src/main.c
+@@ -1,2 +1,2 @@
+-int x = 1;
++int x = 2;
diff --git a/testcorpus/with-patch/manifest.json b/testcorpus/with-patch/manifest.json
new file mode 100644
index 0000000..cf4776e
--- /dev/null
+++ b/testcorpus/with-patch/manifest.json
@@ -0,0 +1,30 @@
+{
+ "name": "with-patch",
+ "build": "succeed",
+ "sig": true,
+ "packages": [],
+ "installed": [
+ {
+ "name": "glibc",
+ "version": "2.39-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "pacman",
+ "version": "6.1.0-1",
+ "arch": "x86_64"
+ },
+ {
+ "name": "binutils",
+ "version": "2.42-1",
+ "arch": "x86_64"
+ }
+ ],
+ "log_lines": [
+ "==> Making package.",
+ "==> Entering fakeroot environment."
+ ],
+ "expect": {
+ "notes": "recipe_hash must cover fix.patch"
+ }
+}