diff --git a/tests/counter-collection/validate.py b/tests/counter-collection/validate.py index 2e17b69dc0..ceded9efec 100644 --- a/tests/counter-collection/validate.py +++ b/tests/counter-collection/validate.py @@ -30,27 +30,10 @@ def test_counter_values(input_data): scaling_factor = 64 / itr["wave_front_size"] break - scaling_factor = 64 / itr["wave_front_size"] - - for itr in data["rocprofiler-sdk-json-tool"]["buffer_records"][ - "counter_collection" - ]: - value = itr["counter_value"] - assert int(round(value, 0)) == int(round(1 * scaling_factor, 0)), ( - f"Failure on agent " - f"{str(itr)} expected {1 * scaling_factor} but got {value} " - f"Debug Info:\n {str(data)}" - ) - - for itr in data["rocprofiler-sdk-json-tool"]["buffer_records"][ - "counter_collection" - ]: + for itr in data["rocprofiler-sdk-json-tool"]["buffer_records"]["counter_collection"]: value = itr["counter_value"] - assert int(round(value, 0)) == int(round(1 * scaling_factor, 0)), ( - f"Failure on agent " - f"{str(itr)} expected {1 * scaling_factor} but got {value} " - f"Debug Info:\n {str(data)}" - ) + assert int(round(value, 0)) == int(round(1 * scaling_factor, 0)), str(data) + if __name__ == "__main__": exit_code = pytest.main(["-x", __file__] + sys.argv[1:])