| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
Fix Windows path handling in env_name_from_path() and add native Windows tests Root Cause Analysis: env_name_from_path() only handled Unix paths with '/' separator. On Windows, paths use '\\' and contain ':' in drive letters (C:). When using --root option on Windows, this generated invalid env names containing ':' which triggered validation error. Solution: 1. Trim both '/' and '\\' characters 2. Replace '/' with "__", '\\' with "__", and ':' with "_" 3. This produces valid environment names like __C_Users_name_path Added tests/in-windows/ with CMD scripts for native Windows testing: - run-tests.cmd: Main entrance script - lib.cmd: Common functions - cases/: Test cases for env-path-auto-discovery, export-import, history-restore, install-remove-upgrade Fixes: run-tests.cmd on Windows fails with: Environment name contains invalid character ':' Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
Fix Windows path handling in env_name_from_path() and add native Windows tests Root Cause Analysis: env_name_from_path() only handled Unix paths with '/' separator. On Windows, paths use '\\' and contain ':' in drive letters (C:). When using --root option on Windows, this generated invalid env names containing ':' which triggered validation error. Solution: 1. Trim both '/' and '\\' characters 2. Replace '/' with "__", '\\' with "__", and ':' with "_" 3. This produces valid environment names like __C_Users_name_path Added tests/in-windows/ with CMD scripts for native Windows testing: - run-tests.cmd: Main entrance script - lib.cmd: Common functions - cases/: Test cases for env-path-auto-discovery, export-import, history-restore, install-remove-upgrade Fixes: run-tests.cmd on Windows fails with: Environment name contains invalid character ':' Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 4 个月前 | |
tests: add run-tests.sh entry point for Windows native tests in WSL2 Problem: - Windows batch tests (tests/in-windows/*.cmd) cannot run directly from WSL2 because cmd.exe does not support UNC paths (\\wsl.localhost\...) - No way to run individual test cases from WSL2 - EPKG_BIN environment variable not supported in run-tests.cmd Purpose: Enable running Windows native tests from WSL2 with single test selection capability, similar to tests/in-vm/test-one.sh interface. Solution: 1. Add run-tests.sh - WSL2 entry point that: - Copies tests and binary to Windows-accessible temp location (C:\temp_epkg_test_*) - Runs tests via cmd.exe from C: drive to avoid UNC path issues - Supports EPKG_BIN environment variable for custom binary path - Supports -d/-dd/-ddd debug flags - Supports selecting individual test case: env-path-auto-discovery, export-import, history-restore, install-remove-upgrade (or iur), all 2. Modify run-tests.cmd to: - Accept optional second argument for test name - Add goto labels for running individual tests - Add :done label for proper exit code handling Usage: cd tests/in-windows ./run-tests.sh # Run all tests ./run-tests.sh export-import # Run single test ./run-tests.sh -dd install-remove-upgrade # Debug mode EPKG_BIN=dist/epkg.exe ./run-tests.sh # Custom binary Examples: ./run-tests.sh ./run-tests.sh iur ./run-tests.sh -dd history-restore Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 | |
tests: remove set -e from test scripts per tests/README.md principles Remove 'set -e' from the following test scripts: - busybox/busybox-runtest.sh - busybox/mk-epkg-bindir.sh - busybox/run-one.sh - in-windows/run-tests.sh - lua/test_compare.sh - lua/test_lua.sh Per tests/README.md principles: - Test scripts should not use 'set -e' to preserve context and error info - Debugging failed tests requires seeing the full context, not immediate exit Signed-off-by: Wu Fengguang <wfg@mail.ustc.edu.cn> | 3 个月前 |
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
| 4 个月前 | ||
| 4 个月前 | ||
| 3 个月前 | ||
| 3 个月前 |