diff options
author | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-04 23:24:49 +0100 |
---|---|---|
committer | Daniel Friesel <daniel.friesel@uos.de> | 2020-11-04 23:24:49 +0100 |
commit | 08685393661dd37244a11b9cde74fa6d15852b08 (patch) | |
tree | 2a3e000df2aac378c662949d1c41fce510bdd7ad /lib | |
parent | c3a92f7255398f6500b868c20c0afd538dae09bf (diff) |
harness: show message when encountering unparseable line
Diffstat (limited to 'lib')
-rw-r--r-- | lib/harness.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/lib/harness.py b/lib/harness.py index d1440db..163bc2b 100644 --- a/lib/harness.py +++ b/lib/harness.py @@ -243,12 +243,14 @@ class TransitionHarness: if re.match(r"\[PTA\] benchmark start, id=(\S+)", line): self.synced = True print("[HARNESS] synced, {}/{}".format(self.repetitions + 1, self.repeat)) + return if self.synced: res = re.match(r"\[PTA\] trace=(\S+) count=(\S+)", line) if res: self.trace_id = int(res.group(1)) self.trace_length = int(res.group(2)) self.current_transition_in_trace = 0 + return if self.log_return_values: res = re.match(r"\[PTA\] transition=(\S+) return=(\S+)", line) else: @@ -344,6 +346,8 @@ class TransitionHarness: ): break self.current_transition_in_trace += 1 + else: + print(f"[HARNESS] cannot parse line: {line}") class OnboardTimerHarness(TransitionHarness): @@ -533,12 +537,14 @@ class OnboardTimerHarness(TransitionHarness): if re.match(r"\[PTA\] benchmark start, id=(\S+)", line): self.synced = True print("[HARNESS] synced, {}/{}".format(self.repetitions + 1, self.repeat)) + return if self.synced: res = re.match(r"\[PTA\] trace=(\S+) count=(\S+)", line) if res: self.trace_id = int(res.group(1)) self.trace_length = int(res.group(2)) self.current_transition_in_trace = 0 + return if self.log_return_values: res = re.match( r"\[PTA\] transition=(\S+) prevcycles=(\S+)/(\S+) cycles=(\S+)/(\S+) return=(\S+)", @@ -720,3 +726,5 @@ class OnboardTimerHarness(TransitionHarness): prev_state_duration_us ) self.current_transition_in_trace += 1 + else: + print(f"[HARNESS] cannot parse line: {line}") |