mirror of
https://github.com/Bubberstation/Bubberstation.git
synced 2026-08-22 04:30:44 +01:00
Adds exclude_from_ci support to unit tests, again (#96545)
## About The Pull Request When I was working on #96368 I was unaware of the following: <img width="584" height="294" alt="image" src="https://github.com/user-attachments/assets/a6578a46-04e8-4316-a2d6-5aaadffbdea6" /> So I'm fixing it. ## Why It's Good For The Game Sorry downstreams ## Changelog No user facing changes
This commit is contained in:
@@ -20,14 +20,13 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE)
|
||||
|
||||
// This code is responsible for splitting up create & destroy across multiple integration tests.
|
||||
var/total_amount_to_check = length(type_paths_to_check)
|
||||
var/runner_count = length(config.maplist)
|
||||
var/runner_count = max(length(config.maplist), 1)
|
||||
|
||||
var/split_up_amount = floor(total_amount_to_check / runner_count)
|
||||
|
||||
var/what_map_index_are_we = 1
|
||||
for(var/map_name, _map_config in config.maplist)
|
||||
var/datum/map_config/map_config = _map_config
|
||||
if(SSmapping.current_map.map_name == map_config.map_name)
|
||||
for(var/map_name in config.maplist)
|
||||
if(SSmapping.current_map.map_name == map_name)
|
||||
break
|
||||
what_map_index_are_we++
|
||||
|
||||
@@ -39,7 +38,7 @@ GLOBAL_VAR_INIT(running_create_and_destroy, FALSE)
|
||||
type_paths_to_check = type_paths_to_check.Copy(start_index, end_index + 1)
|
||||
|
||||
log_world("Running create and destroy on [length(type_paths_to_check)] atoms out of the [total_amount_to_check] total")
|
||||
log_world("([start_index] [type_paths_to_check[1]]) - ([end_index] [type_paths_to_check[length(type_paths_to_check)]])")
|
||||
log_world("([start_index + 1] [type_paths_to_check[1]]) - ([end_index] [type_paths_to_check[length(type_paths_to_check)]])")
|
||||
|
||||
for(var/type_path in type_paths_to_check)
|
||||
if(ispath(type_path, /turf))
|
||||
|
||||
@@ -378,7 +378,7 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
|
||||
primary_unit_test_map = map_config
|
||||
if(!LAZYLEN(map_config.skipped_tests) && !found_secondary_unit_test_map)
|
||||
found_secondary_unit_test_map = TRUE
|
||||
if(SSmapping.current_map.map_name == map_config.map_name)
|
||||
if(SSmapping.current_map.map_name == map_name)
|
||||
is_secondary_unit_test_map = TRUE
|
||||
|
||||
var/list/tests_to_run = list()
|
||||
@@ -386,7 +386,10 @@ GLOBAL_VAR_INIT(focused_tests, focused_tests())
|
||||
for (var/datum/unit_test/potential_test as anything in subtypesof(/datum/unit_test))
|
||||
// If the test has [UNIT_TEST_DEBUG_MAP_ONLY] and we aren't the primary unit test map, skip it.
|
||||
// HOWEVER, some unit tests are incompatible with the primary testing map, so we must offload them a secondary one with no blacklisted tests.
|
||||
if((potential_test::test_flags & UNIT_TEST_DEBUG_MAP_ONLY) && !SSmapping.current_map.is_unit_test_map && \
|
||||
// If we didn't find a primary unit test map then we are likely a solo runner.
|
||||
if((potential_test::test_flags & UNIT_TEST_DEBUG_MAP_ONLY) && \
|
||||
!isnull(primary_unit_test_map) && \
|
||||
!SSmapping.current_map.is_unit_test_map && \
|
||||
!(primary_unit_test_map.skipped_tests?.Find(potential_test) && is_secondary_unit_test_map) \
|
||||
)
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user