;;;; A program that just runs, for evaluating expressions against. ;;;; ;;;; Unlike dev-loop.flan it does not count reloads and stop: C-x C-e is a ;;;; thunk the agent runs at a frame boundary, so a program under test has to ;;;; keep reaching them. (agent/wait 5) is both the poll and the pacing — 5ms ;;;; of nothing, which is what a frame is when there is no frame. (import agent "vendor:agent") ;;; A condition, so that a body typed in later can error and stop the program ;;; where an editor can see it. It is here rather than in the evaluated form ;;; because the break loop matches on a class the *host* was compiled with. (defstruct Missing [id i32]) (defvar ticks i64) (defn step [] i64 (set ticks (+ ticks 1)) ticks) (defn main [] i32 (agent/start "/tmp/flan-dev-repl-fallback.sock") ;; 24000 and not the 4000 the other fixtures use, because this one is the ;; whole of test_emacs: one daemon carries every check from `flan-connect' to ;; the break loop, and 4000 ticks of 5ms is a two-minute test with a ;; twenty-second program in it. Run the suite on a machine with several ;; compilers on it and the program can reach its last tick while the client ;; is still working — which fails honestly ("the program exited; restart flan ;; dev") but fails for a reason that has nothing to do with what was being ;; checked. dev-robust.flan is 24000 for the same reason and got there first. ;; The watchdogs, at 600s, are what actually bounds the run. (dotimes [i 24000] (agent/wait 5) (set ticks (step))) 0)