diff options
author | Daniel Friesel <derf@finalrewind.org> | 2019-03-05 08:44:46 +0100 |
---|---|---|
committer | Daniel Friesel <derf@finalrewind.org> | 2019-03-05 08:44:46 +0100 |
commit | 57b27d7d96f832fbedf65a5111ad9dd4f0aaa53c (patch) | |
tree | 166f29711547e9865776b03c196c3a266c51d605 /lib/harness.py | |
parent | 965b35d6ae356a0aed8b7a044af62e868f1fab4e (diff) |
DFA benchmarks: Add missing boilerplate code
Diffstat (limited to 'lib/harness.py')
-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 c03406c..3f8d93c 100644 --- a/lib/harness.py +++ b/lib/harness.py @@ -15,6 +15,10 @@ class OnboardTimerHarness: if self.gpio_pin != None: ret += '#define PTALOG_GPIO {}\n'.format(self.gpio_pin) ret += '#include "object/ptalog.h"\n' + if self.gpio_pin != None: + ret += 'PTALog ptalog({});\n'.format(self.gpio_pin) + else: + ret += 'PTALog ptalog;\n' return ret def start_benchmark(self): @@ -48,6 +52,10 @@ class TransitionHarness: if self.gpio_pin != None: ret += '#define PTALOG_GPIO {}\n'.format(self.gpio_pin) ret += '#include "object/ptalog.h"\n' + if self.gpio_pin != None: + ret += 'PTALog ptalog({});\n'.format(self.gpio_pin) + else: + ret += 'PTALog ptalog;\n' return ret def start_benchmark(self): |