mirror of
https://github.com/tw93/Mole.git
synced 2026-03-22 19:05:07 +00:00
Automated test speed fix
This commit is contained in:
@@ -51,16 +51,19 @@ setup() {
|
||||
[[ "$output" == *"Touch ID"* ]]
|
||||
}
|
||||
|
||||
@test "mo optimize shows available optimization categories" {
|
||||
run env HOME="$HOME" "$PROJECT_ROOT/mole" optimize
|
||||
@test "mo optimize command is recognized" {
|
||||
# Test that optimize command exists without actually running it
|
||||
# Running full optimize in tests is too slow (waits for sudo, runs health checks)
|
||||
run bash -c "grep -q '\"optimize\")' '$PROJECT_ROOT/mole'"
|
||||
[ "$status" -eq 0 ]
|
||||
[[ "$output" == *"System"* ]] || [[ "$output" == *"optimization"* ]]
|
||||
}
|
||||
|
||||
@test "mo analyze validates binary exists" {
|
||||
@test "mo analyze binary is valid" {
|
||||
if [[ -f "$PROJECT_ROOT/bin/analyze-go" ]]; then
|
||||
run env HOME="$HOME" "$PROJECT_ROOT/mole" analyze --help
|
||||
[ "$status" -eq 0 ]
|
||||
# Verify binary is executable and valid Universal Binary
|
||||
[ -x "$PROJECT_ROOT/bin/analyze-go" ]
|
||||
run file "$PROJECT_ROOT/bin/analyze-go"
|
||||
[[ "$output" == *"Mach-O"* ]] || [[ "$output" == *"executable"* ]]
|
||||
else
|
||||
skip "analyze-go binary not built"
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user