diff options
author | nod_ <nod_@598310.no-reply.drupal.org> | 2024-11-26 11:53:13 +0100 |
---|---|---|
committer | nod_ <nod_@598310.no-reply.drupal.org> | 2024-11-26 11:53:13 +0100 |
commit | 1b5e41604ce149b51a0b6990a339f748acda22a6 (patch) | |
tree | c3abd13cb84bcea9920102fac96ebc806110b817 | |
parent | 3de28c0f6799e25824d52ab7b7406f7a0b31b11d (diff) | |
download | drupal-1b5e41604ce149b51a0b6990a339f748acda22a6.tar.gz drupal-1b5e41604ce149b51a0b6990a339f748acda22a6.zip |
Issue #3487816 by catch, berdir, smustgrave, quietone: Ensure tests don't run twice
-rwxr-xr-x | core/scripts/run-tests.sh | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh index 71c4b1045e9..bbaa1f38678 100755 --- a/core/scripts/run-tests.sh +++ b/core/scripts/run-tests.sh @@ -946,16 +946,16 @@ function simpletest_script_get_test_list() { foreach ($groups as $group => $tests) { $not_slow_tests = array_merge($not_slow_tests, array_keys($tests)); } - // Filter slow tests out of the not slow tests since they may appear in more - // than one group. - $not_slow_tests = array_diff($not_slow_tests, $slow_tests); + // Filter slow tests out of the not slow tests and ensure a unique list + // since tests may appear in more than one group. + $not_slow_tests = array_unique(array_diff($not_slow_tests, $slow_tests)); // If the tests are not being run in parallel, then ensure slow tests run // all together first. if ((int) $args['ci-parallel-node-total'] <= 1 ) { sort_tests_by_type_and_methods($slow_tests); sort_tests_by_type_and_methods($not_slow_tests); - $test_list = array_unique(array_merge($slow_tests, $not_slow_tests)); + $test_list = array_merge($slow_tests, $not_slow_tests); } else { // Sort all tests by the number of public methods on the test class. @@ -976,7 +976,7 @@ function simpletest_script_get_test_list() { // And the same for the rest of the tests. $binned_other_tests = place_tests_into_bins($not_slow_tests, $bin_count); $other_tests_for_job = $binned_other_tests[$args['ci-parallel-node-index'] - 1]; - $test_list = array_unique(array_merge($slow_tests_for_job, $other_tests_for_job)); + $test_list = array_merge($slow_tests_for_job, $other_tests_for_job); } } else { |