Skip to content

armgit / klad

Public Imported from GitHub
0

A drawing app built for agent/human collaboration

Rust

The editor's tests take their pointer input from the test, also on a Mac

Indicode BV321db0d52b6f
diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 392bd78..758886c 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -86,12 +86,22 @@ jobs:
said smoke
said tests
} >> "$GITHUB_STEP_SUMMARY"
- for log in compile smoke tests; do
+ for log in compile smoke; do
[ -f "$log.log" ] || continue
- { grep -m 6 -E "^error|panicked at|FAILED" "$log.log" || true; } | while read -r line; do
+ { grep -m 6 -E "^error|panicked at" "$log.log" || true; } | while read -r line; do
echo "::warning title=${{ matrix.name }} $log::$line"
done
done
+ if [ -f tests.log ]; then
+ failed="$({ grep -E "^test .* FAILED$" tests.log || true; } | sed -E 's/^test (.*) \.\.\. FAILED$/\1/' | sort -u | tr '\n' ' ')"
+ [ -z "$failed" ] || echo "::warning title=${{ matrix.name }} tests that failed::$failed"
+ { grep -A 1 "panicked at" tests.log || true; } | { grep -v "^--$" || true; } | paste -d ' ' - - | cut -c1-400 | head -n 8 | while read -r line; do
+ echo "::warning title=${{ matrix.name }} test failure::$line"
+ done
+ { grep -E "^test result|^error" tests.log || true; } | { grep -v " 0 failed" || true; } | head -n 4 | while read -r line; do
+ echo "::warning title=${{ matrix.name }} tests::$line"
+ done
+ fi
- name: Tests must pass where klad is tested
if: steps.tests.outcome == 'failure' && runner.os != 'Windows'
run: exit 1
diff --git a/crates/app/src/editor.rs b/crates/app/src/editor.rs
index 1e01a80..431e156 100644
--- a/crates/app/src/editor.rs
+++ b/crates/app/src/editor.rs
@@ -781,7 +781,7 @@ impl Editor {
canvas_rect: Rect::NOTHING,
navigating: false,
focused: false,
- pen: Pen::install(),
+ pen: if cfg!(test) { None } else { Pen::install() },
readout: Readout::default(),
pending: None,
stats: Arc::default(),