diff --git a/interop.py b/interop.py index e7e6562..b571813 100644 --- a/interop.py +++ b/interop.py @@ -306,35 +306,36 @@ def _export_results(self): "measurements": [], } - for client, server in self._client_server_pairs: - results = [] - for test in self._tests: - r = None - if hasattr(self.test_results[server][client][test], "value"): - r = self.test_results[server][client][test].value - results.append( - { - "abbr": test.abbreviation(), - "name": test.name(), # TODO: remove - "result": r, - } - ) - out["results"].append(results) + for client in clients: + for server in servers: + results = [] + for test in self._tests: + r = None + if hasattr(self.test_results[server][client][test], "value"): + r = self.test_results[server][client][test].value + results.append( + { + "abbr": test.abbreviation(), + "name": test.name(), # TODO: remove + "result": r, + } + ) + out["results"].append(results) - measurements = [] - for measurement in self._measurements: - res = self.measurement_results[server][client][measurement] - if not hasattr(res, "result"): - continue - measurements.append( - { - "name": measurement.name(), # TODO: remove - "abbr": measurement.abbreviation(), - "result": res.result.value, - "details": res.details, - } - ) - out["measurements"].append(measurements) + measurements = [] + for measurement in self._measurements: + res = self.measurement_results[server][client][measurement] + if not hasattr(res, "result"): + continue + measurements.append( + { + "name": measurement.name(), # TODO: remove + "abbr": measurement.abbreviation(), + "result": res.result.value, + "details": res.details, + } + ) + out["measurements"].append(measurements) f = open(self._output, "w") json.dump(out, f)