[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Running bash tests
From: |
Greg Wooledge |
Subject: |
Re: Running bash tests |
Date: |
Thu, 10 Oct 2024 09:43:31 -0400 |
On Thu, Oct 10, 2024 at 15:05:23 +0200, Dennis Orlando wrote:
> Executing the `run-all` script in "tests" after compiling with `make`
> produces a ton of unintuitive output. There sure must be a better way to
> run all the tests, right? Did I miss something?
I believe the official starting point is to run "make tests" from the
top level directory in the source tree. I'm not sure if it's any
different from what you did, however.
Generally, it prints the name of a test suite that it's going to
execute (e.g. "run-ifs"), then any warnings it feels you should know
about, and then a diff between the expected output and the actual
output.
Mine ends with this text:
run-type
run-varenv
warning: some of these tests will fail if arrays have not
warning: been compiled into the shell
268d267
< trap -- '' SIGFPE
271d269
< trap -- '' SIGFPE
274d271
< trap -- '' SIGFPE
277d273
< trap -- '' SIGFPE
run-vredir
warning: the text of a system error message may vary between systems and
warning: produce diff output.
So, the run-type test was executed with no warnings and no failures.
The run-varenv test had a warning, which does not apply to me (I didn't
disable arrays), and then had some differences in the expected output.
The run-vredir test had a warning, but no failures.
If I cared enough, I could look at the run-varenv test and try to figure
out why it produced those lines of diff output. In this particular case,
right now, I don't.
I did get more interesting results from the "run-history" test, though:
run-history
warning: all of these tests will fail if history has not been compiled
warning: into the shell
190a191,195
> (left
> mid
> right)
> A
> B
191a197,201
> (left
> mid
> right)
> A
> B
200a211,215
> (left
> mid
> right)
> A
> B
204a220,224
> (left
> mid
> right)
> A
> B
run-ifs
run-ifs-posix
I would imagine there's something worth looking at in there, whether it
be an actual bug in bash's history command, or a bug in the test suite.