TEST: Fix some miscellaneous bits

Fix some miscellaneous bits in the test suite:

 (1) In makescript $(wild ...) isn't a make function, $(wildcard ...) should
     be used instead.

 (2) Emit more metadata.

 (3) Remove a trailing blank line.

Signed-off-by: David Howells <dhowells@redhat.com>
TEST: Explicitly use bash

The test runner and test scripts make use of non-POSIX (Bash specific)
features that cause problems when Bash is not /bin/sh. All mentions of
/bin/sh should be changed to /bin/bash to work on systems that, for
example, use Dash for /bin/sh.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.com>
TEST: Make endianness detection work with file 5.14

The 5.14 release of file outputs an extra space after [LM]SB:

$ ./src/file -m magic/magic.mgc -L /proc/$$/exe
/proc/12755/exe: ELF 64-bit LSB  executable, ...

This was due to the elf magic file containing some trailing spaces in
the 5.14 release.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.com>
TEST: Skip tests when external commands are unavailable

When relying on external commands, such as getenforce, skip the test if
the required commands are unavailable.

This patch adds a function to the toolbox that allows tests to declare
their required commands at the top of the test script.

If which cannot locate the command, a message is written to the output
file, a marker is printed indicating which command is missing, and the
test script is terminated with a passing result.

Additionally, the patch adds require_command declarations for commands
required in the bz1031154 test.

Signed-off-by: Tyler Hicks <tyhicks@canonical.com>
Signed-off-by: David Howells <dhowells@redhat.com>
All files pertinent to the testsuite need to be declared

All files pertinent to the testsuite need to be declared in the FILES= macro
in the tests/Makefile so that the testing infrastructure knows what is
relevant.

Signed-off-by: David Howells <dhowells@redhat.com>