From e6f67b90c272b71091a2a80977de36b816c9b915 Mon Sep 17 00:00:00 2001 From: Matthias Tafelmeier Date: Tue, 28 Nov 2023 13:44:19 +0100 Subject: [PATCH] define test run systemd service units --- testing/infra/machines/nix/configuration.nix | 23 ++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/testing/infra/machines/nix/configuration.nix b/testing/infra/machines/nix/configuration.nix index adf9d912..5c036b8b 100644 --- a/testing/infra/machines/nix/configuration.nix +++ b/testing/infra/machines/nix/configuration.nix @@ -39,6 +39,29 @@ }; }; + systemd.services.test-client = { + enable = true; + wantedBy = [ ]; + after = [ ]; + description = "Start test-client"; + serviceConfig = { + Type = "exec"; + EnvironmentFile = "/home/test/sink_ip"; + ExecStart = "/run/current-system/sw/bin/iperf3 -P 5 -t 36000 -c $SINK_IP"; + }; + }; + + systemd.services.test-server = { + enable = true; + wantedBy = [ ]; + after = [ ]; + description = "Start test-server"; + serviceConfig = { + Type = "exec"; + ExecStart = "/run/current-system/sw/bin/iperf3 -s"; + }; + }; + environment.systemPackages = with pkgs; [ python3 bashInteractive_5