Skip to content

Commit 2affb72

Browse files
committed
Simplify AI test script execution
1 parent fa1153f commit 2affb72

File tree

2 files changed

+7
-4
lines changed

2 files changed

+7
-4
lines changed

.github/copilot-instructions.md

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
1-
Use `test.sh` to run all tests. In addition to just running all tests, that
2-
script will do linting, some cross compiling and more.
1+
Use `MOOR_SKIP_INTERACTIVE_TESTS=1 ./test.sh` to run all tests. In addition to
2+
just running all tests, that script will do linting, some cross compiling and
3+
more.
34

45
The `twin` directory contains the text windowing library used by `moor`. It is
56
used for screen output. See its README for details.
67

78
Inside of `twin`, log levels are:
8-
- Debug: Only to be show when the user explicitly enables debug logging
9+
- Debug: Only to be shown when the user explicitly enables debug logging
910
- Info: Goes into crash reports, can be helpful as crash context
1011
- Error: Triggers crash reports, these things should be fixed

test.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,9 @@ echo Testing not crashing with different argument orders...
8888

8989
# We can only do this test if we have a terminal. This means it will be run
9090
# locally but not in CI. Not great, but better than nothing.
91-
if [[ -t 1 ]]; then
91+
#
92+
# Set MOOR_SKIP_INTERACTIVE_TESTS=1 to disable interactive TTY tests.
93+
if [[ "${MOOR_SKIP_INTERACTIVE_TESTS}" != "1" && -t 1 ]]; then
9294
echo Test auto quitting on single screen...
9395
echo " (success)" | ./moor --quit-if-one-screen
9496
fi

0 commit comments

Comments
 (0)