chiark / gitweb /
test: run-*: allow overriding the command
[hippotat.git] / test / run-client
index 9396c4eb6b8b9508ceb4da4cb6334b7fe13c5fa1..9b20eb7c96db5fd41da02fd9af8b110f2c3fb6cc 100755 (executable)
@@ -1,3 +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
-target/debug/hippotat --config src/test/test.cfg --debug
+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 "$@"
+