Skip to content

Commit

Permalink
Update test_results.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YuriiPerets authored Aug 27, 2024
1 parent ef56f6e commit c548afc
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions tests/test_results.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
_remove_device_compiler_gcc_clang_enabled_cuda_backend,
_remove_specific_cuda_clang_combinations,
_remove_unsupported_clang_sdk_versions_for_clang_cuda,
_remove_unsupported_gcc_versions_for_ubuntu2004,
)
from bashi.versions import NvccHostSupport, NVCC_GCC_MAX_VERSION

Expand Down Expand Up @@ -2202,3 +2203,50 @@ def test_remove_unsupported_clang_sdk_versions_for_clang_cuda(self):
expected_results,
create_diff_parameter_value_pairs(test_param_value_pairs, expected_results),
)

def test_remove_unsupported_gcc_versions_for_ubuntu2004(self):
test_param_value_pairs: List[ParameterValuePair] = parse_expected_val_pairs(
[
OD({DEVICE_COMPILER: (GCC, 6), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 6), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 7), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 3), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 13), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 99), UBUNTU: (UBUNTU, "20.04")}),
OD({DEVICE_COMPILER: (GCC, 6), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 6), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 7), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 3), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 6), DEVICE_COMPILER: (GCC, 6)}),
OD({HOST_COMPILER: (GCC, 10), DEVICE_COMPILER: (NVCC, 11.2)}),
OD({HOST_COMPILER: (GCC, 6), DEVICE_COMPILER: (NVCC, 11.2)}),
OD({HOST_COMPILER: (GCC, 3), DEVICE_COMPILER: (NVCC, 12.2)}),
]
)

_remove_unsupported_gcc_versions_for_ubuntu2004(test_param_value_pairs)

test_param_value_pairs.sort()
expected_results = sorted(
parse_expected_val_pairs(
[
OD({HOST_COMPILER: (GCC, 7), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 13), UBUNTU: (UBUNTU, "20.04")}),
OD({HOST_COMPILER: (GCC, 99), UBUNTU: (UBUNTU, "20.04")}),
OD({DEVICE_COMPILER: (GCC, 6), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 6), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 7), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 3), UBUNTU: (UBUNTU, "18.04")}),
OD({HOST_COMPILER: (GCC, 6), DEVICE_COMPILER: (GCC, 6)}),
OD({HOST_COMPILER: (GCC, 10), DEVICE_COMPILER: (NVCC, 11.2)}),
OD({HOST_COMPILER: (GCC, 6), DEVICE_COMPILER: (NVCC, 11.2)}),
OD({HOST_COMPILER: (GCC, 3), DEVICE_COMPILER: (NVCC, 12.2)}),
]
)
)

self.assertEqual(
test_param_value_pairs,
expected_results,
create_diff_parameter_value_pairs(test_param_value_pairs, expected_results),
)

0 comments on commit c548afc

Please sign in to comment.