Skip to content

Commit 5147065

Browse files
committed
python: Switched to use opp_scavetool to generate baseline and current results.
This avoids duplication when scalars are stored and also calculated as fields as scalars when reading the files.
1 parent cf43fd7 commit 5147065

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

python/inet/test/statistical.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@
3333
]
3434

3535
def _read_scalar_result_file(file_name):
36-
df = read_result_files(file_name, include_fields_as_scalars=True)
36+
df = read_result_files(file_name)
3737
df = get_scalars(df, include_runattrs=True)
3838
df = df if df.empty else df[["experiment", "measurement", "replication", "module", "name", "value"]]
3939
return df
@@ -104,6 +104,8 @@ def check_simulation_task_result(self, simulation_task_result, result_name_filte
104104
if os.path.exists(current_vector_result_file_name):
105105
run_command_with_logging(["opp_scavetool", "x", "--precision=17", "--type", "sth", "-w", current_scalar_result_file_name, current_vector_result_file_name, "-o", current_scalar_result_file_name])
106106
os.remove(current_vector_result_file_name)
107+
else:
108+
run_command_with_logging(["opp_scavetool", "x", "--precision=17", "--type", "sth", "-w", current_scalar_result_file_name, "-o", current_scalar_result_file_name])
107109
if os.path.exists(current_index_result_file_name):
108110
os.remove(current_index_result_file_name)
109111
_remove_attr_lines(current_scalar_result_file_name)
@@ -218,6 +220,8 @@ def check_simulation_task_result(self, simulation_task_result, result_name_filte
218220
if os.path.exists(current_vector_result_file_name):
219221
run_command_with_logging(["opp_scavetool", "x", "--precision=17", "--type", "sth", "-w", current_scalar_result_file_name, current_vector_result_file_name, "-o", current_scalar_result_file_name])
220222
os.remove(current_vector_result_file_name)
223+
else:
224+
run_command_with_logging(["opp_scavetool", "x", "--precision=17", "--type", "sth", "-w", current_scalar_result_file_name, "-o", current_scalar_result_file_name])
221225
if os.path.exists(current_index_result_file_name):
222226
os.remove(current_index_result_file_name)
223227
_remove_attr_lines(current_scalar_result_file_name)

0 commit comments

Comments
 (0)