Skip to content

Commit

Permalink
Add testing save-dfs in analyze mode
Browse files Browse the repository at this point in the history
Signed-off-by: Jose Santos <josantos@login1.hpcfund>
  • Loading branch information
Jose Santos committed Feb 26, 2024
1 parent f2235b7 commit 1d103de
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 265 deletions.
32 changes: 32 additions & 0 deletions tests/test_analyze_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -1628,3 +1628,35 @@ def test_dependency_MI100():
):
omniperf.main()
assert e.value.code == 0

@pytest.mark.misc
def test_save_dfs():
output_path = "tests/workloads/vcopy/saved_analysis"
with pytest.raises(SystemExit) as e:
with patch(
"sys.argv",
[
"omniperf",
"analyze",
"--path",
"tests/workloads/vcopy/MI100",
"--save-dfs",
output_path,
],
):
omniperf.main()
assert e.value.code == 0
files_in_workload = os.listdir(output_path)
for file_name in files_in_workload:
import pandas as pd
df = pd.read_csv(output_path + "/" + file_name)
print(file_name)
single_row_tables = [
'0.1_Top_Kernels.csv',
'13.3_Instruction_Cache_-_L2_Interface.csv',
'18.1_Aggregate_Stats_(All_32_channels).csv'
]
if file_name in single_row_tables:
assert len(df.index) == 1
else:
assert len(df.index) >= 3
265 changes: 0 additions & 265 deletions tests/test_saved_analysis.py

This file was deleted.

0 comments on commit 1d103de

Please sign in to comment.