6 Commits

Author SHA1 Message Date
PF4Public
0f037b2ee3 coverage dependency
coverage should not start until testboards unpacked
2023-08-12 23:56:21 +01:00
Ian Campbell
f851594b52 Add license header to tests/*
These files were all originally by Bernhard in 2016 via these commits:

8445d71 unify-fex: Use int64_t and portable format specifiers for its output
f957f89 fextest: Add a dedicated rule for (CI-)testing sunxi-boards
6ec3876 tests: Improve code coverage by testing corner cases
cd5a0a3 tests: Improve on testing fexc
5cbb0c9 tests: Introduce a basic testing framework

and have not otherwise been touched. The header was added to unify-fex.c when
it was added in cd5a0a3303cb ("tests: Improve on testing fexc") but not to the
other files.

The license in unify-fex.c is the GPLv2+ which corresponds to the content of
LICENSE.md both at the time and now. I think therefore that it is appropriate
to duplicate the header into the other files (changing only the character used
for comments to suit)
2022-02-20 13:28:31 +00:00
Bernhard Nortmann
f957f89d21 fextest: Add a dedicated rule for (CI-)testing sunxi-boards
Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-11-12 13:53:11 +01:00
Bernhard Nortmann
6ec3876b55 tests: Improve code coverage by testing corner cases
This patch adds shell scripts that deliberately go through some
extra program invocations, e.g. erroneous use of fex2bin. The goal
of these test cases is to improve on code (branch) coverage.

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-11-12 13:51:38 +01:00
Bernhard Nortmann
cd5a0a3303 tests: Improve on testing fexc
After all .fex files can be successfully compiled, let's also
test the opposite direction by decompiling the resulting .bin.
The output then has to pass an automated diff against the source
.fex (transformed via some preprocessing with "unify-fex").

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-11-12 13:38:40 +01:00
Bernhard Nortmann
5cbb0c91a4 tests: Introduce a basic testing framework
All tests should go into the new "tests" subdirectory. The idea is
that the separate Makefile in that directory will get invoked via
a top-level "make check".

The tests/Makefile should then take care of running all available
tests, returning an appropriate exit status. Future tests may be
functional, examine code metrics (coverage analysis), or both.

For a start, I'd simply like to check that sunxi-fexc is able to
properly compile all the .fex files from linux-sunxi/sunxi-boards.

(Note: This currently FAILS and will probably require adjustments
to both sunxi-tools and the .fex repository. To work around this,
for now I'm applying patches to fix sunxi-boards.)

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-11-12 13:38:40 +01:00