Commit 85804a4
Fall back to gtimeout, or no timeout, when GNU timeout is absent
run_examples.sh calls `timeout`, which is GNU coreutils. macOS ships
neither `timeout` nor `gtimeout` unless coreutils is installed, so every
example failed there with "timeout: command not found".
This is not new — `timeout` is on main — but it was unreachable until the
glob fix in this PR. While the script collected zero examples it always
exited 0 without invoking anything, so the dependency never fired. Now
that it collects 142, a default run on a Mac fails every one of them for
a reason that has nothing to do with the examples.
Prefer `timeout`, fall back to `gtimeout`, and run unbounded with a
warning if neither exists, rather than failing everything. The banner
reports which of the two applies instead of always claiming a limit.
Verified both branches against Conductor OSS 3.32.0, with 74 as the
example: with no timeout binary, the warning prints and 74 passes in 6s;
with coreutils installed, the banner reports the 300s limit and 74 passes
in 5s. The skip list is honoured either way -- `run_examples.sh 60`
reports "No examples to run." rather than touching the GitHub examples.
Note the script also needs bash 4+ for `declare -A`, which stock macOS
bash 3.2 does not provide. That is left alone here.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>1 parent d383fcd commit 85804a4
1 file changed
Lines changed: 16 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
24 | 33 | | |
25 | 34 | | |
26 | 35 | | |
| |||
139 | 148 | | |
140 | 149 | | |
141 | 150 | | |
142 | | - | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
143 | 156 | | |
144 | 157 | | |
145 | 158 | | |
| |||
163 | 176 | | |
164 | 177 | | |
165 | 178 | | |
166 | | - | |
| 179 | + | |
167 | 180 | | |
168 | | - | |
| 181 | + | |
169 | 182 | | |
170 | 183 | | |
171 | 184 | | |
| |||
0 commit comments