diff options
Diffstat (limited to 'tests')
-rwxr-xr-x | tests/cyclictest/parse | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/tests/cyclictest/parse b/tests/cyclictest/parse index e83090a..75f29b8 100755 --- a/tests/cyclictest/parse +++ b/tests/cyclictest/parse @@ -1,3 +1,10 @@ -#!/bin/bash +#!/usr/bin/env python3 +import re +import fileinput -cat | grep -e "^! .* ok$" | sed -n '2p' | awk '{print $17}' +result_re = re.compile("! T: 0 \(.*\) P:.* I:.* C:.* Min: *(?P<min>\d+) Act: *(?P<act>\d+) Avg: *(?P<avg>\d+) Max: *(?P<max>\d+) ok") + +for line in fileinput.input(): + match = result_re.match(line) + if match: + print(match.group('max')) |