build: include tests/Makefile if available
authorPaul Spooren <[email protected]>
Thu, 6 Jun 2024 17:28:52 +0000 (19:28 +0200)
committerHauke Mehrtens <[email protected]>
Mon, 15 Jul 2024 22:14:18 +0000 (00:14 +0200)
commitd8dd03c46fd484dea9ea8f787a342de85e7cf7d3
tree01dcaa5e46a9413d6a679ccbc1904a4a8f2d9f47
parent84b000e5d0b490306f3d1d0641d84f0e79931150
build: include tests/Makefile if available

Testing OpenWrt is important, and there is a test suite in the making.
For maximum convenience and minimal CI over-usage, make it simple to run
tests locally. The main Makefile now attempts to include
`tests/Makefile` and silently fails if it doesn't.

While the test suite[1] is still young, it provides good examples of how
to test things around OpenWrt: starting with shell scripts using
`bats`[2], followed by QEMU tests, and finally real device tests using
LabGrid[3]. This could lead to the creation of the best OpenWrt version
yet.

Please consult the `openwrt-tests.git` README.md for details on the
setup. Once installed you may run commands like the following:

* make tests/shell  # run shell tests
* make tests/x86-64 # run  and test x86/64 in QEMU

[1]: http://github.com/aparcar/openwrt-tests/
[2]: https://bats-core.readthedocs.io
[3]: https://labgrid.readthedocs.io

Signed-off-by: Paul Spooren <[email protected]>
Link: https://github.com/openwrt/openwrt/pull/15647
Signed-off-by: Christian Marangi <[email protected]>
(cherry picked from commit a8ff0c1b7e5aefb8bcd31e0eeb82d2c11399223f)
Makefile