chiark / gitweb /
test: run-*: allow overriding the command
[hippotat.git] / test / run-client
index fdb1e4e747f42d28e2baa87d9e6d2b209c52d0a5..9b20eb7c96db5fd41da02fd9af8b110f2c3fb6cc 100755 (executable)
@@ -1,6 +1,16 @@
 #!/bin/sh
+# Copyright 2021 Ian Jackson and contributors to Hippotat
+# SPDX-License-Identifier: GPL-3.0-or-later
+# There is NO WARRANTY.
+
 set -e
-slug=$1
+slug=$1; if [ $# -gt 0 ]; then shift; fi
+
+if [ "x$1" = x--- ]; then
+       shift
+else
+       set target/debug/hippotat --config src/test/test.cfg --debug "$@"
+fi
+
+ip netns exec hippotat-t-$slug-client "$@"
 
-ip netns exec hippotat-t-$slug-client \
-target/debug/hippotat --config src/test/test.cfg --debug