demarcate analysis tests into groups
Signed-off-by: Karl W Schulz <karl.schulz@amd.com>
[ROCm/rocprofiler-compute commit: fafff47822]
Este cometimento está contido em:
cometido por
Karl W. Schulz
ascendente
fba2e174fb
cometimento
66eb4dc88c
@@ -6,7 +6,10 @@ from importlib.machinery import SourceFileLoader
|
||||
|
||||
omniperf = SourceFileLoader("omniperf", "src/omniperf").load_module()
|
||||
|
||||
baseline_opts = ["omniperf", "analyze"]
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_valid_path():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -25,6 +28,7 @@ def test_valid_path():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_list_kernels():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -55,6 +59,7 @@ def test_list_kernels():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.list_metrics
|
||||
def test_list_metrics_gfx90a():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch("sys.argv", ["omniperf", "analyze", "--list-metrics", "gfx90a"]):
|
||||
@@ -92,6 +97,7 @@ def test_list_metrics_gfx90a():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.list_metrics
|
||||
def test_list_metrics_gfx906():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch("sys.argv", ["omniperf", "analyze", "--list-metrics", "gfx906"]):
|
||||
@@ -129,6 +135,7 @@ def test_list_metrics_gfx906():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.list_metrics
|
||||
def test_list_metrics_gfx908():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch("sys.argv", ["omniperf", "analyze", "--list-metrics", "gfx908"]):
|
||||
@@ -166,6 +173,7 @@ def test_list_metrics_gfx908():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_metrics
|
||||
def test_filter_metrics_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -198,6 +206,7 @@ def test_filter_metrics_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_metrics
|
||||
def test_filter_metrics_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -230,6 +239,7 @@ def test_filter_metrics_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_metrics
|
||||
def test_filter_metrics_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -262,6 +272,7 @@ def test_filter_metrics_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_metrics
|
||||
def test_filter_metrics_4():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -294,6 +305,7 @@ def test_filter_metrics_4():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_metrics
|
||||
def test_filter_metrics_5():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -326,6 +338,7 @@ def test_filter_metrics_5():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_metrics
|
||||
def test_filter_metrics_6():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -358,6 +371,7 @@ def test_filter_metrics_6():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_kernel
|
||||
def test_filter_kernel_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -390,6 +404,7 @@ def test_filter_kernel_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_kernel
|
||||
def test_filter_kernel_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -422,6 +437,7 @@ def test_filter_kernel_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.filter_kernel
|
||||
def test_filter_kernel_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -456,6 +472,7 @@ def test_filter_kernel_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.dispatch
|
||||
def test_dispatch_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -488,6 +505,7 @@ def test_dispatch_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.dispatch
|
||||
def test_dispatch_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -520,6 +538,7 @@ def test_dispatch_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.dispatch
|
||||
def test_dispatch_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -552,6 +571,7 @@ def test_dispatch_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.dispatch
|
||||
def test_dispatch_4():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -586,6 +606,7 @@ def test_dispatch_4():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.dispatch
|
||||
def test_dispatch_5():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -620,6 +641,7 @@ def test_dispatch_5():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_gpu_ids():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -652,6 +674,7 @@ def test_gpu_ids():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.normal_unit
|
||||
def test_normal_unit_per_wave():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -684,6 +707,7 @@ def test_normal_unit_per_wave():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.normal_unit
|
||||
def test_normal_unit_per_cycle():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -716,6 +740,7 @@ def test_normal_unit_per_cycle():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.normal_unit
|
||||
def test_normal_unit_per_second():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -748,6 +773,7 @@ def test_normal_unit_per_second():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.normal_unit
|
||||
def test_normal_unit_per_kernel():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -780,6 +806,7 @@ def test_normal_unit_per_kernel():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.max_kernel
|
||||
def test_max_kernel_num_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -812,6 +839,7 @@ def test_max_kernel_num_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.max_kernel
|
||||
def test_max_kernel_num_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -844,6 +872,7 @@ def test_max_kernel_num_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.max_kernel
|
||||
def test_max_kernel_num_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -876,6 +905,7 @@ def test_max_kernel_num_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.max_kernel
|
||||
def test_max_kernel_num_4():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -908,6 +938,7 @@ def test_max_kernel_num_4():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.time_unit
|
||||
def test_time_unit_s():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -940,6 +971,7 @@ def test_time_unit_s():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.time_unit
|
||||
def test_time_unit_ms():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -972,6 +1004,7 @@ def test_time_unit_ms():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.time_unit
|
||||
def test_time_unit_us():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1004,6 +1037,7 @@ def test_time_unit_us():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.time_unit
|
||||
def test_time_unit_ns():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1036,6 +1070,7 @@ def test_time_unit_ns():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.decimal
|
||||
def test_decimal_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1068,6 +1103,7 @@ def test_decimal_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.decimal
|
||||
def test_decimal_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1100,6 +1136,7 @@ def test_decimal_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.decimal
|
||||
def test_decimal_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1132,6 +1169,7 @@ def test_decimal_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_save_dfs():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1164,6 +1202,7 @@ def test_save_dfs():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.col
|
||||
def test_col_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1196,6 +1235,7 @@ def test_col_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.col
|
||||
def test_col_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1228,6 +1268,7 @@ def test_col_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.col
|
||||
def test_col_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1262,6 +1303,7 @@ def test_col_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_g():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1292,6 +1334,7 @@ def test_g():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_0():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1324,6 +1367,7 @@ def test_kernel_verbose_0():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_1():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1356,6 +1400,7 @@ def test_kernel_verbose_1():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_2():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1388,6 +1433,7 @@ def test_kernel_verbose_2():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_3():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1420,6 +1466,7 @@ def test_kernel_verbose_3():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_4():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1452,6 +1499,7 @@ def test_kernel_verbose_4():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_5():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1484,6 +1532,7 @@ def test_kernel_verbose_5():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.kernel_verbose
|
||||
def test_kernel_verbose_6():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1516,6 +1565,7 @@ def test_kernel_verbose_6():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_baseline():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
@@ -1563,6 +1613,7 @@ def test_baseline():
|
||||
assert e.value.code == 0
|
||||
|
||||
|
||||
@pytest.mark.misc
|
||||
def test_dependency_mi100():
|
||||
with pytest.raises(SystemExit) as e:
|
||||
with patch(
|
||||
|
||||
Criar uma nova questão referindo esta
Bloquear um utilizador