1
0
mirror of https://blitiri.com.ar/repos/chasquid synced 2026-01-27 20:45:56 +00:00

test: Don't run "go build" each time a helper is invoked

Our tests invoke a variety of helpers, some of them are written in Go.
Today, we call "go build" (directly or indirectly via "go run"), which is
a bit wasteful and slows down the tests.

This patch makes the tests only build our Go helpers once every 10s at
most.

The solution is a bit hacky but in the context of these tests, it's
practical.
This commit is contained in:
Alberto Bertogli
2024-03-09 13:03:24 +00:00
parent 76a72367ae
commit 3c3c32e2fb
4 changed files with 46 additions and 16 deletions

View File

@@ -74,6 +74,8 @@ fi
# Test chasquid-util's ability to do alias resolution talking to chasquid.
# We use chamuyero for convenience, so we can match the output exactly.
# We run it once to ensure it gets built.
chasquid-util --help > /dev/null
for i in *.cmy; do
if ! chamuyero "$i" > "$i.log" 2>&1 ; then
echo "$i failed, log follows"