support/testing: add test for check-package
authorRicardo Martincoski <ricardo.martincoski@gmail.com>
Sun, 4 Nov 2018 04:12:07 +0000 (02:12 -0200)
committerArnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
Sat, 3 Aug 2019 15:17:29 +0000 (17:17 +0200)
commit4323fbaf8d203da5782d042d6f2fd399300ca03a
tree5b4b0d3d16b1950d9ca515fc1f33133016a2adad
parent8669243da3c4d6f86a912b5dfda9006e87789eec
support/testing: add test for check-package

Check the basic usage for check-package.

It can be called using either absolute path, relative path or from PATH.
Files to be checked can be passed with either absolute path or relative
path (also including files in the current directory).

Also check it ignores some special files when checking intree files,
i.e. package/pkg-generic.mk, while still generating warnings for out-of-tree
files when called with -b.
In order to allow the later, add an empty line to the Config.in in the
br2-external being tested so the script does generate a warning.

Catches bug #11271.

More tests can be added later, for example compatibility to Python 3.

Suggested-by: Arnout Vandecappelle <arnout@mind.be>
Signed-off-by: Ricardo Martincoski <ricardo.martincoski@gmail.com>
Cc: Arnout Vandecappelle <arnout@mind.be>
[Arnout: wrap at 80 columns where appropriate; merge into a single
class.]
Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
.gitlab-ci.yml
support/testing/tests/utils/__init__.py [new file with mode: 0644]
support/testing/tests/utils/br2-external/Config.in [new file with mode: 0644]
support/testing/tests/utils/br2-external/external.desc [new file with mode: 0644]
support/testing/tests/utils/br2-external/external.mk [new file with mode: 0644]
support/testing/tests/utils/test_check_package.py [new file with mode: 0644]