Commit 2d5beca
committed
sharness: add function to check for COLUMNS usability
Problem: With some versions of bash (likely >= 5.0), the COLUMNS shell
variable, when overridden in the environment for testing purposes, is
not preserved across invocation of the flux(1) command driver during
sharness tests. This appears to occur because COLUMNS is reset by
the libtool wrapper script (which has the shebang line #!/bin/bash),
and only seems to occur if the sharness test is run with `-d -v`
for unknown reason.
Add a function to sharness.d/flux-sharness.sh that checks if COLUMNS
can be preserved in the testsuite environment across an invocation of
`flux(1)`. This can be used by tests that require this functionality
to set a prereq, allowing them to skip the tests if necessary instead
of erroneously failing.1 parent 1a25d9a commit 2d5beca
1 file changed
+17
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
292 | 292 | | |
293 | 293 | | |
294 | 294 | | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
295 | 312 | | |
296 | 313 | | |
297 | 314 | | |
| |||
0 commit comments