Commit 57eb2b6
committed
tests: helpers: provide a "sane" run helper
The runc wrapper we have had for a long time is useful for debugging
errors (because bats's built-in "run" doesn't provide the output of the
program in case of an error). However, it might be necessary to run
other programs in a similar wrapper.
In addition, it might be needed to add timeouts or use the bats_pipe
feature (bats v1.10.0) with similar wrapping. Adding support for this in
the sane_run wrapper makes it a little easier to use these things when
writing tests.
This is somewhat adapted from umoci's sane_run helper.
Signed-off-by: Aleksa Sarai <cyphar@cyphar.com>1 parent 8680b58 commit 57eb2b6
2 files changed
+41
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
164 | 164 | | |
165 | 165 | | |
166 | 166 | | |
| 167 | + | |
167 | 168 | | |
168 | 169 | | |
169 | 170 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
42 | | - | |
43 | | - | |
44 | | - | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
45 | 76 | | |
46 | 77 | | |
47 | 78 | | |
48 | 79 | | |
49 | | - | |
| 80 | + | |
50 | 81 | | |
51 | 82 | | |
52 | 83 | | |
53 | 84 | | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
54 | 90 | | |
55 | 91 | | |
56 | 92 | | |
| |||
0 commit comments