5 Commits

Author SHA1 Message Date
Bernhard Nortmann
8445d71f4e unify-fex: Use int64_t and portable format specifiers for its output
Otherwise we could run into ambiguities with "long long",
and Windows compilation is likely to bail out as it might
not understand "%ll".

Signed-off-by: Bernhard Nortmann <bernhard.nortmann@web.de>
2016-11-13 15:56:32 +01: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