From 85b7750327238afee8252e2654cf9ba5295c0d1c Mon Sep 17 00:00:00 2001 From: Paul Spooren Date: Sun, 20 Sep 2020 19:36:02 -1000 Subject: [PATCH] CONTRIBUTING: add CI information Describe briefly the details on the new runtime CI. Signed-off-by: Paul Spooren --- CONTRIBUTING.md | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 02615f3126..993915b93f 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -181,3 +181,38 @@ commenting and amending the proposed changes. | OpenSSL License | OpenSSL | | X11 License | X11 | | zlib License | Zlib | + +## Continuous Integration + +To simplify review and require less human resources, a CI tests all packages. +Passing CI tests are not a hard requirement but a good indicator what the +Buildbots will think about the proposed patch. + +The CI builds modified packages for multiple architectures using the latest +snapshot SDK. For supported architectures (`aarch64_generic`, +`arm_cortex-a15_neon-vfpv4`, `i386_pentium4` and `x86_64`) an additional +runtime test is executed. A running OpenWrt is simulated which tries to install +created packages and runs a script called `test.sh` located next to the package +Makefile. The script is executed with the two arguments `PKG_NAME` and +`PKG_VERSION`. The `PKG_NAME` can be used to distinguish package variants, e.g. +`foobar` vs. `foobar-full`. The `PKG_VERSION` can be used for a trivial test +checking if `foobar --version` prints the correct version. `PKG_VERSION` is the +OpenWrt version and therefore includes the `PKG_RELEASE`, which isn't usually +part of the running programs version. + +The following snippet show a script that tests different binaries, depending +what IPK package was installed. The `gpsd` Makefile produces both a `gpsd` and +a `gpsd-clients` IPK package. + +```shell + #!/bin/sh + +case "$1" in + "gpsd") + gpsd -V 2>&1 | grep "$2" + ;; + "gpsd-clients") + cgps -V 2>&1 | grep "$2" + ;; +esac +``` -- 2.30.2