mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2024-12-29 04:50:03 +01:00
ci: Add tests for examples folder
examples/readme: add missing entries examples: document examples with no readme
This commit is contained in:
parent
10b63585ea
commit
83e93a5b73
2
dist/tools/ci/static_tests.sh
vendored
2
dist/tools/ci/static_tests.sh
vendored
@ -129,6 +129,8 @@ run ./dist/tools/feature_resolution/check.sh
|
|||||||
run ./dist/tools/boards_supported/check.sh
|
run ./dist/tools/boards_supported/check.sh
|
||||||
run ./dist/tools/codespell/check.sh
|
run ./dist/tools/codespell/check.sh
|
||||||
run ./dist/tools/cargo-checks/check.sh
|
run ./dist/tools/cargo-checks/check.sh
|
||||||
|
run ./dist/tools/examples_check/check_has_readme.sh
|
||||||
|
run ./dist/tools/examples_check/check_in_readme.sh
|
||||||
if [ -z "${GITHUB_RUN_ID}" ]; then
|
if [ -z "${GITHUB_RUN_ID}" ]; then
|
||||||
run ./dist/tools/uncrustify/uncrustify.sh --check
|
run ./dist/tools/uncrustify/uncrustify.sh --check
|
||||||
else
|
else
|
||||||
|
27
dist/tools/examples_check/check_has_readme.sh
vendored
Executable file
27
dist/tools/examples_check/check_has_readme.sh
vendored
Executable file
@ -0,0 +1,27 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Path to the examples directory
|
||||||
|
EXAMPLES_DIR="$(dirname "$0")/../../../examples"
|
||||||
|
|
||||||
|
# Get a list of all directories in the examples directory
|
||||||
|
directories=$(find "$EXAMPLES_DIR" -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)
|
||||||
|
|
||||||
|
# Check each directory
|
||||||
|
missing_entries=()
|
||||||
|
for dir in $directories; do
|
||||||
|
if [ ! -f "$EXAMPLES_DIR/$dir/README.md" ]; then
|
||||||
|
missing_entries+=("$dir")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Report missing entries
|
||||||
|
if [ ${#missing_entries[@]} -eq 0 ]; then
|
||||||
|
echo "All examples have a README"
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "The following directories are missing a README:"
|
||||||
|
for entry in "${missing_entries[@]}"; do
|
||||||
|
echo "- $entry"
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
30
dist/tools/examples_check/check_in_readme.sh
vendored
Executable file
30
dist/tools/examples_check/check_in_readme.sh
vendored
Executable file
@ -0,0 +1,30 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# Path to the examples directory
|
||||||
|
EXAMPLES_DIR="$(dirname "$0")/../../../examples"
|
||||||
|
|
||||||
|
# Path to the README.md file
|
||||||
|
README_FILE="$EXAMPLES_DIR/README.md"
|
||||||
|
|
||||||
|
# Get a list of all directories in the examples directory
|
||||||
|
directories=$(find "$EXAMPLES_DIR" -maxdepth 1 -mindepth 1 -type d -exec basename {} \;)
|
||||||
|
|
||||||
|
# Check each directory
|
||||||
|
missing_entries=()
|
||||||
|
for dir in $directories; do
|
||||||
|
if ! grep -q "$dir" "$README_FILE"; then
|
||||||
|
missing_entries+=("$dir")
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
# Report missing entries
|
||||||
|
if [ ${#missing_entries[@]} -eq 0 ]; then
|
||||||
|
echo "All directories are listed in the README.md file."
|
||||||
|
exit 0
|
||||||
|
else
|
||||||
|
echo "The following directories are missing in the README.md file:"
|
||||||
|
for entry in "${missing_entries[@]}"; do
|
||||||
|
echo "- $entry"
|
||||||
|
done
|
||||||
|
exit 1
|
||||||
|
fi
|
@ -74,6 +74,8 @@ Here is a quick overview of the examples available in the RIOT:
|
|||||||
- [gcoap_fileserver](./gcoap_fileserver/README.md)
|
- [gcoap_fileserver](./gcoap_fileserver/README.md)
|
||||||
- This example demonstrates the usage of the `gcoap`
|
- This example demonstrates the usage of the `gcoap`
|
||||||
module to serve files over CoAP.
|
module to serve files over CoAP.
|
||||||
|
- [gcoap_dtls](./gcoap_dtls/README.md)
|
||||||
|
- This example demonstrates the usage of the `gcoap` module with DTLS.
|
||||||
- [nanocoap_server](./nanocoap_server/README.md)
|
- [nanocoap_server](./nanocoap_server/README.md)
|
||||||
- This example demonstrates the usage of the `nanocoap` module, a high-level API for CoAP (Constrained Application Protocol) messaging.
|
- This example demonstrates the usage of the `nanocoap` module, a high-level API for CoAP (Constrained Application Protocol) messaging.
|
||||||
|
|
||||||
@ -145,6 +147,7 @@ Here is a quick overview of the examples available in the RIOT:
|
|||||||
|
|
||||||
### Misc
|
### Misc
|
||||||
|
|
||||||
|
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< Updated upstream
|
||||||
- [lorawan](./lorawan/README.md)
|
- [lorawan](./lorawan/README.md)
|
||||||
- This application shows a basic LoRaWAN use-case with RIOT.
|
- This application shows a basic LoRaWAN use-case with RIOT.
|
||||||
- [openthread](./openthread/README.md)
|
- [openthread](./openthread/README.md)
|
||||||
@ -163,6 +166,22 @@ Here is a quick overview of the examples available in the RIOT:
|
|||||||
- [sniffer](./sniffer/README.md)
|
- [sniffer](./sniffer/README.md)
|
||||||
- This application is built to run together with the script `./tools/sniffer.py`
|
- This application is built to run together with the script `./tools/sniffer.py`
|
||||||
as a sniffer for (wireless) data traffic.
|
as a sniffer for (wireless) data traffic.
|
||||||
|
- [benckmark_udp](./benchmark_udp/README.md)
|
||||||
|
- This example uses the `benchmark_udp` module to create a stress-test for the RIOT network stack.
|
||||||
|
====================================================================================================
|
||||||
|
| Example | Description |
|
||||||
|
|---------|-------------|
|
||||||
|
| [lorawan](./lorawan/README.md) | This application shows a basic LoRaWAN use-case with RIOT. |
|
||||||
|
| [openthread](./openthread/README.md) | This example demonstrates the usage of the OpenThread stack in RIOT. |
|
||||||
|
| [lwm2m](./lwm2m/README.md) | Example of a LWM2M client on RIOT |
|
||||||
|
| [ccn-lite-relay](./ccn-lite-relay/README.md) | This application demonstrates how to use the Content-Centric Networking stack from [CCN-Lite](http://www.ccn-lite.net/) on RIOT |
|
||||||
|
| [telnet_server](./telnet_server/README.md) | Simple telnet server that listens on port 23 over IPv6. |
|
||||||
|
| [posix_sockets](./posix_sockets/README.md) | Showcase for RIOT's POSIX socket support |
|
||||||
|
| [spectrum-scanner](./spectrum-scanner/README.md) | This example demonstrates how to monitor energy levels on all available wireless channels |
|
||||||
|
| [sniffer](./sniffer/README.md) | This application is built to run together with the script `./tools/sniffer.py` as a sniffer for (wireless) data traffic. |
|
||||||
|
| [benckmark_udp](./benchmark_udp/README.md) | This example uses the `benchmark_udp` module to create a stress-test for the RIOT network stack. |
|
||||||
|
| [sock_tcp_echo](./sock_tcp_echo/README.md) | This is a simple TCP echo server / client that uses the SOCK API. |
|
||||||
|
>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> Stashed changes
|
||||||
|
|
||||||
## Advanced Examples
|
## Advanced Examples
|
||||||
|
|
||||||
@ -188,3 +207,7 @@ Here is a quick overview of the examples available in the RIOT:
|
|||||||
- This example allows testing different two-way ranging algorithms between
|
- This example allows testing different two-way ranging algorithms between
|
||||||
two boards supporting a dw1000 device. This makes use of the uwb-core
|
two boards supporting a dw1000 device. This makes use of the uwb-core
|
||||||
pkg.
|
pkg.
|
||||||
|
- [senml_saul](./senml_saul/README.md)
|
||||||
|
- This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module with the SenML (Sensor Measurement Lists) format.
|
||||||
|
- [opendsme](./opendsme/README.md)
|
||||||
|
- This example demonstrates the usage of the OpenDSME module in RIOT.
|
||||||
|
3
examples/gcoap_fileserver/README.md
Normal file
3
examples/gcoap_fileserver/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# GCoAP Fileserver
|
||||||
|
|
||||||
|
This example demonstrates how to create a CoAP server that serves files from the filesystem.
|
3
examples/pio_blink/README.md
Normal file
3
examples/pio_blink/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# RaspberryPi Pico PIO Blink
|
||||||
|
|
||||||
|
This example demonstrates how to use the PIO peripheral on the RaspberryPi Pico to blink an LED. The PIO peripheral is a programmable I/O block that can be used to implement custom digital interfaces that work at extremely high speeds.
|
3
examples/senml_saul/README.md
Normal file
3
examples/senml_saul/README.md
Normal file
@ -0,0 +1,3 @@
|
|||||||
|
# senml_saul
|
||||||
|
|
||||||
|
This example demonstrates the usage of the SAUL (Sensor Actuator Uber Layer) module with the SenML (Sensor Measurement Lists) format.
|
Loading…
Reference in New Issue
Block a user