CI Ping/Iperf: add tests, print without lock, reduce code lines

Add some basic unit tests to verify that Iperf/Ping work. Harmonize the
logging by only print in the "main" iperf/ping function, to avoid that
if we test with multiple UEs, the output intermixes. Also, do one common
mkdir before starting multiple pings/iperfs. Finally, harmonize the
paths so that Iperf and Ping log their files in the same place.
This commit is contained in:
Robert Schmidt
2024-09-28 12:45:07 +02:00
parent 02d5f953a8
commit 0da2f27fa7
5 changed files with 105 additions and 47 deletions
+1 -1
View File
@@ -128,7 +128,7 @@ class LocalCmd(Cmd):
def copyin(self, src, tgt, recursive=False):
if src[0] != '/' or tgt[0] != '/':
raise Exception('support only absolute file paths!')
raise Exception(f'support only absolute file paths (src {src} tgt {tgt})!')
opt = '-r' if recursive else ''
return self.run(f'cp {opt} {src} {tgt}').returncode == 0