From 84374b4b4e41c4bb7896092c10098b5e6b5f68c1 Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Wed, 11 Sep 2019 17:59:23 +0200 Subject: explicitly collect binary versions There is no generic way to retrieve the version of a binary. Not everyone followes GNU cli guidelines and supports "--version". The larson benchmark for example reads input from stdin when started with "larson --version" blocking the Benchmark.prepare() call. --- src/benchmarks/lld.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/benchmarks/lld.py') diff --git a/src/benchmarks/lld.py b/src/benchmarks/lld.py index bcedced..97ef545 100644 --- a/src/benchmarks/lld.py +++ b/src/benchmarks/lld.py @@ -25,6 +25,7 @@ import sys import matplotlib.pyplot as plt from src.benchmark import Benchmark +import src.facter from src.util import download_reporthook @@ -51,6 +52,9 @@ class BenchmarkLld(Benchmark): def prepare(self): super().prepare() + # save lld version + self.results["facts"]["versions"]["lld"] = src.facter.exe_version("ld.lld", "-v") + test_dir = "lld-speed-test" test_archive = f"{test_dir}.tar.xz" if not os.path.isdir(test_dir): -- cgit v1.2.3