diff --git a/CMakeLists.txt b/CMakeLists.txt index 2a911f96f8..97b3d47a06 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -253,60 +253,17 @@ set_tests_properties( add_test( NAME test_analyze_commands - COMMAND pytest -n ${PYTEST_NUMPROCS} --junitxml=tests/test_analyze_commands.xml - ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py + COMMAND + pytest -n ${PYTEST_NUMPROCS} -m "not serial" + --junitxml=tests/test_analyze_commands.xml ${COV_OPTION} + ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) -# add_test( NAME test_analyze_commands_misc COMMAND pytest -m misc ${COV_OPTION} -# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_list_metrics COMMAND pytest -m list_metrics -# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_filter_metrics COMMAND pytest -m filter_metrics -# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_filter_kernel COMMAND pytest -m filter_kernel -# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_dispatch COMMAND pytest -m dispatch ${COV_OPTION} -# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_normal_unit COMMAND pytest -m normal_unit -# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_max_kernel COMMAND pytest -m max_kernel -# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_time_unit COMMAND pytest -m time_unit ${COV_OPTION} -# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_decimal COMMAND pytest -m decimal ${COV_OPTION} -# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_col COMMAND pytest -m col ${COV_OPTION} -# ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# add_test( NAME test_analyze_commands_kernel_verbose COMMAND pytest -m kernel_verbose -# ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py WORKING_DIRECTORY -# ${PROJECT_SOURCE_DIR}) -# -# set_tests_properties( test_analyze_commands_misc test_analyze_commands_list_metrics -# test_analyze_commands_filter_metrics test_analyze_commands_filter_kernel -# test_analyze_commands_dispatch test_analyze_commands_normal_unit -# test_analyze_commands_max_kernel test_analyze_commands_time_unit -# test_analyze_commands_decimal test_analyze_commands_col -# test_analyze_commands_kernel_verbose PROPERTIES LABELS "analyze_commands") +add_test( + NAME test_analyze_commands_serial + COMMAND pytest -m "serial" --junitxml=tests/test_analyze_commands_serial.xml + ${COV_OPTION} ${PROJECT_SOURCE_DIR}/tests/test_analyze_commands.py + WORKING_DIRECTORY ${PROJECT_SOURCE_DIR}) # --------------------------- # analyze workloads tests diff --git a/pyproject.toml b/pyproject.toml index 2253af0b1d..d470c6367d 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -54,4 +54,5 @@ markers = [ "decimal", "col", "kernel_verbose", + "serial", ] diff --git a/tests/test_analyze_commands.py b/tests/test_analyze_commands.py index 262e914590..332bf8206d 100644 --- a/tests/test_analyze_commands.py +++ b/tests/test_analyze_commands.py @@ -373,7 +373,7 @@ def test_filter_block_6(): assert e.value.code == 0 -@pytest.mark.filter_kernel +@pytest.mark.serial def test_filter_kernel_1(): with pytest.raises(SystemExit) as e: with patch( @@ -406,7 +406,7 @@ def test_filter_kernel_1(): assert e.value.code == 0 -@pytest.mark.filter_kernel +@pytest.mark.serial def test_filter_kernel_2(): with pytest.raises(SystemExit) as e: with patch( @@ -439,7 +439,7 @@ def test_filter_kernel_2(): assert e.value.code == 1 -@pytest.mark.filter_kernel +@pytest.mark.serial def test_filter_kernel_3(): with pytest.raises(SystemExit) as e: with patch( @@ -474,7 +474,7 @@ def test_filter_kernel_3(): assert e.value.code == 1 -@pytest.mark.dispatch +@pytest.mark.serial def test_dispatch_1(): with pytest.raises(SystemExit) as e: with patch( @@ -507,7 +507,7 @@ def test_dispatch_1(): assert e.value.code == 0 -@pytest.mark.dispatch +@pytest.mark.serial def test_dispatch_2(): with pytest.raises(SystemExit) as e: with patch( @@ -540,7 +540,7 @@ def test_dispatch_2(): assert e.value.code == 0 -@pytest.mark.dispatch +@pytest.mark.serial def test_dispatch_3(): with pytest.raises(SystemExit) as e: with patch( @@ -573,7 +573,7 @@ def test_dispatch_3(): assert e.value.code == 0 -@pytest.mark.dispatch +@pytest.mark.serial def test_dispatch_4(): with pytest.raises(SystemExit) as e: with patch( @@ -608,7 +608,7 @@ def test_dispatch_4(): assert e.value.code == 1 -@pytest.mark.dispatch +@pytest.mark.serial def test_dispatch_5(): with pytest.raises(SystemExit) as e: with patch(