]> git.99rst.org Git - openwrt-packages.git/commitdiff
frp: add test script
authorAlexandru Ardelean <redacted>
Sun, 9 Aug 2026 09:40:50 +0000 (12:40 +0300)
committerAlexandru Ardelean <redacted>
Tue, 11 Aug 2026 10:50:26 +0000 (13:50 +0300)
Add a CI test.sh exercising basic package functionality.

Signed-off-by: Alexandru Ardelean <redacted>
net/frp/test.sh [new file with mode: 0755]

diff --git a/net/frp/test.sh b/net/frp/test.sh
new file mode 100755 (executable)
index 0000000..fd53475
--- /dev/null
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+# frpc/frps both accept "verify -c <file>" to validate a config without
+# connecting, which exercises the TOML config loader end-to-end.
+case "$1" in
+frpc)
+       conf="/tmp/frpc.$$.toml"
+       printf 'serverAddr = "127.0.0.1"\nserverPort = 7000\n' > "$conf"
+       frpc verify -c "$conf" || { echo "FAIL: frpc rejected a valid config"; rm -f "$conf"; exit 1; }
+       rm -f "$conf"
+       ;;
+frps)
+       conf="/tmp/frps.$$.toml"
+       printf 'bindPort = 7000\n' > "$conf"
+       frps verify -c "$conf" || { echo "FAIL: frps rejected a valid config"; rm -f "$conf"; exit 1; }
+       rm -f "$conf"
+       ;;
+*)
+       exit 0
+       ;;
+esac
git clone https://git.99rst.org/PROJECT