Created
February 5, 2022 23:24
-
-
Save joachimschmidt557/d5673ba66d3c3012d40db9c2a5cb5755 to your computer and use it in GitHub Desktop.
Automatically enable passing behavior tests
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/env bash | |
IFS=":" | |
rg --json "if \(builtin.zig_backend == .stage2_arm\) return error.SkipZigTest;" test/behavior/ | jq -r 'select(.type == "match") | "\(.data.path.text):\(.data.line_number)"' | while read -r file line; do | |
cp "$file" "$file.bak" | |
sed -i "$line s/^/\/\//" "$file" | |
if "$PWD/zig-out/bin/zig" test -target arm-linux-gnu test/behavior.zig; then | |
rm "$file.bak" | |
else | |
mv "$file.bak" "$file" | |
fi | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment