| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
dev-projects: abort run()/run_install() on non-zero exit, drop || exit 1 boilerplate Problem: - Every run() call needed '|| exit 1' to abort on command failure - Easy to forget, leads to silent failures Solution: - _run_logged now calls 'exit $r' on non-zero return code - Non-piped run()/run_install() calls no longer need '|| exit 1' - Piped invocations (run ... | grep ...) unaffected — exit only aborts the pipe subshell, so still need '|| exit 1' - Direct $EPKG_BIN calls still need '|| exit 1' Also: remove remaining >/dev/null redirections per test principle "avoid lots of >/dev/null: we are testing! so preserve context and error info" Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests/dev-projects: add AI coding assistant scene tests Add test scripts for popular AI coding assistants: - opencode.sh: opencode-ai (v1.14.28) - Node.js based AI assistant - openclaw.sh: openclaw@beta - Skips on Node.js < v22 (requires v22.12+) - claude.sh: @anthropic-ai/claude-code (v2.1.119) - Anthropic's Claude Code - codex.sh: @openai/codex (v0.125.0) - OpenAI's Codex CLI All tests install via npm and verify with --version command. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
codex: use full path for codex command Problem: npm install -g installs codex to /usr/local/bin/codex. epkg only resolves commands in env's PATH (env_root/usr/bin etc). Simple command name 'codex' fails with exit 127. Root Cause: epkg resolve_command_path() only looks in env paths, not /usr/local/bin. npm global packages go to /usr/local/bin which is outside env. Solution: Use full path /usr/local/bin/codex --version in test. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
dev-projects: abort run()/run_install() on non-zero exit, drop || exit 1 boilerplate Problem: - Every run() call needed '|| exit 1' to abort on command failure - Easy to forget, leads to silent failures Solution: - _run_logged now calls 'exit $r' on non-zero return code - Non-piped run()/run_install() calls no longer need '|| exit 1' - Piped invocations (run ... | grep ...) unaffected — exit only aborts the pipe subshell, so still need '|| exit 1' - Direct $EPKG_BIN calls still need '|| exit 1' Also: remove remaining >/dev/null redirections per test principle "avoid lots of >/dev/null: we are testing! so preserve context and error info" Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
dev-projects: fix epkg-nested.sh POSIX compatibility Problem/Purpose: The scene test epkg-nested.sh failed with syntax error: syntax error near unexpected token '(' Root Cause Analysis: Line 27 used bash-specific process substitution <(echo "$list1"), but the script has #!/bin/sh shebang. On macOS, /bin/sh is a POSIX shell (not bash), which doesn't support process substitution. Solution: Replace process substitution with portable temporary files: - Use mktemp to create temp files - Write comparison data to temp files - diff the temp files - Clean up with rm Fixes: epkg-nested.sh syntax error on macOS Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
dev-projects: abort run()/run_install() on non-zero exit, drop || exit 1 boilerplate Problem: - Every run() call needed '|| exit 1' to abort on command failure - Easy to forget, leads to silent failures Solution: - _run_logged now calls 'exit $r' on non-zero return code - Non-piped run()/run_install() calls no longer need '|| exit 1' - Piped invocations (run ... | grep ...) unaffected — exit only aborts the pipe subshell, so still need '|| exit 1' - Direct $EPKG_BIN calls still need '|| exit 1' Also: remove remaining >/dev/null redirections per test principle "avoid lots of >/dev/null: we are testing! so preserve context and error info" Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests/dev-projects: add AI coding assistant scene tests Add test scripts for popular AI coding assistants: - opencode.sh: opencode-ai (v1.14.28) - Node.js based AI assistant - openclaw.sh: openclaw@beta - Skips on Node.js < v22 (requires v22.12+) - claude.sh: @anthropic-ai/claude-code (v2.1.119) - Anthropic's Claude Code - codex.sh: @openai/codex (v0.125.0) - OpenAI's Codex CLI All tests install via npm and verify with --version command. Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests: fix opencode test on musl by removing invalid .opencode cache Root Cause Analysis: - LC_ALL=C locale (set by epkg in prepare_and_execute_command()) causes bash 5.2 to incorrectly parse '!' negation operator as separate command - The test command '[ -f "$CACHE" ] && ! "$CACHE" --version && rm "$CACHE"' was being parsed as '[ -f "$CACHE" ] && ! && "$CACHE" --version && rm ...' due to LC_ALL=C causing '!' to be interpreted as a command name - This bash locale bug is documented in: https://stackoverflow.com/q/79212656/2243530 Solution: - Rewrite logic to avoid '!' negation operator: '[ ! -f "$CACHE" ] || "$CACHE" --version || rm "$CACHE"' - This achieves same semantics without triggering the locale bug: - If file doesn't exist: skip (first condition true) - If file exists and version works: don't remove (version succeeds) - If file exists and version fails: remove (version fails triggers ||) Fixes: opencode test failed for openeuler (env left for debug: dev-openeuler) Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 | |
dev-projects: abort run()/run_install() on non-zero exit, drop || exit 1 boilerplate Problem: - Every run() call needed '|| exit 1' to abort on command failure - Easy to forget, leads to silent failures Solution: - _run_logged now calls 'exit $r' on non-zero return code - Non-piped run()/run_install() calls no longer need '|| exit 1' - Piped invocations (run ... | grep ...) unaffected — exit only aborts the pipe subshell, so still need '|| exit 1' - Direct $EPKG_BIN calls still need '|| exit 1' Also: remove remaining >/dev/null redirections per test principle "avoid lots of >/dev/null: we are testing! so preserve context and error info" Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests: fix search-paths warning for empty output on non-existent path Problem: - Test script expects "not found" etc when searching non-existent path - epkg returns empty output (like grep), which triggers false warning Solution: - Accept empty output as valid "no results" response - Add [ -z "$result" ] check before warning Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 2 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 3 个月前 | ||
| 2 个月前 | ||
| 3 个月前 | ||
| 2 个月前 |