Skip to content

Commit 5749bea

Browse files
committed
more complex CI fix
1 parent b0d91d2 commit 5749bea

File tree

1 file changed

+14
-2
lines changed

1 file changed

+14
-2
lines changed

scripts/smokeTests.sh

+14-2
Original file line numberDiff line numberDiff line change
@@ -49,9 +49,21 @@ pnpm install -r
4949
pnpm build
5050

5151
OUTFILE="$(mktemp)"
52-
(echo "exit"; sleep 2) | pnpm start --character=characters/trump.character.json > "$OUTFILE"
53-
RESULT=$?
52+
echo $OUTFILE
53+
(
54+
# Wait for the ready message
55+
while true; do
56+
if grep -q "Chat started" "$OUTFILE"; then
57+
echo "exit"; sleep 2
58+
break
59+
fi
60+
sleep 0.5
61+
done
62+
) | pnpm start --character=characters/trump.character.json > "$OUTFILE" &
5463

64+
# Wait for process to finish
65+
wait $!
66+
RESULT=$?
5567
echo "----- OUTPUT START -----"
5668
cat "$OUTFILE"
5769
echo "----- OUTPUT END -----"

0 commit comments

Comments
 (0)