Creates tests/e2e/smoketest.sh — a hermetic end-to-end test that:
- Sets up a mock ZUUR (python3 http.server serving local index/recipes)
- Creates fake zeta-makepkg and zeta scripts (no real Lua tools needed)
- Tests the full pipeline: search → install → upgrade → info → remove
- Verifies exit codes (0, 2 for not-found)
- Verifies installed.json state tracking
- Verifies binary installation/removal via ZETA_ROOT
BUG FOUND (documented in problems.md, not fixed):
- info.d scanDepsArray stores ptrdiff_t indexOf() result in size_t,
causing ArrayIndexError when recipe lacks a deps field.
Workaround: recipe includes deps = {}.
Evidence: .omo/evidence/task-27-tofu-core.log — 16/16 checks pass.
45 lines
1.8 KiB
Plaintext
45 lines
1.8 KiB
Plaintext
=== tofu smoketest ===
|
|
|
|
step 0: build tofu binary... [32mPASS[0m
|
|
step 1: create temp workspace and hello binary... [32mPASS[0m
|
|
step 2: create hello.recipe... [32mPASS[0m
|
|
step 3: create package.lua... [32mPASS[0m
|
|
step 4: create fake zeta-makepkg and zeta... [32mPASS[0m
|
|
step 5: create mock ZUUR layout... [32mPASS[0m
|
|
step 6: start mock ZUUR http server... [32mPASS[0m
|
|
ZUUR_URL=http://127.0.0.1:27644
|
|
CACHE_DIR=/tmp/tmp.707gC0rrPK/cache
|
|
|
|
step 7: tofu -Ss hello (search)... [32mPASS[0m
|
|
step 8: tofu -S hello --noconfirm (install)... [2m . fetching index http://127.0.0.1:27644/index.lua[0m
|
|
[32m ok index loaded: 1 packages[0m
|
|
[36m==> fetching recipe hello[0m
|
|
[2m . downloading hello.recipe[0m
|
|
[2m . downloading package.lua[0m
|
|
[2m . downloading build.sh[0m
|
|
- no build.sh for hello (optional build script)
|
|
[32m ok recipe hello downloaded[0m
|
|
[36m==> generating build plan[0m
|
|
- + hello (recipe)
|
|
[32m ok build plan: 1 packages[0m
|
|
- will build 1 package(s): hello
|
|
[36m==> ──── building hello (1/1) ────[0m
|
|
[32m ok hello[0m
|
|
installing hello-1.0[32m ok installed hello with 0 dependencies[0m
|
|
[32m ok installed 1 package(s)[0m
|
|
installed.json check... [32mPASS[0m
|
|
binary in root check... [32mPASS[0m
|
|
step 9: tofu -Syu --noconfirm (upgrade — nothing to do)... [32mPASS[0m
|
|
step 10: tofu -Si hello (info)... [32mPASS[0m
|
|
step 11: tofu -R hello --noconfirm (remove)... removing hello[32m ok removed hello[0m
|
|
binary removed check... [32mPASS[0m
|
|
installed.json cleared check... [32mPASS[0m
|
|
step 12: tofu -S nonexistent --noconfirm (expect exit 2)... [2m . fetching index http://127.0.0.1:27644/index.lua[0m
|
|
[32m ok index loaded: 1 packages[0m
|
|
[32mPASS[0m
|
|
step 13: cleanup... [32mPASS[0m
|
|
|
|
=== smoketest complete ===
|
|
PASS: 16 checks passed
|
|
All checks passed.
|