Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupal-870918
Manage
Activity
Members
Labels
Plan
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Issue forks
drupal-870918
Commits
1b5e4160
Verified
Commit
1b5e4160
authored
7 months ago
by
Théodore Biadala
Browse files
Options
Downloads
Patches
Plain Diff
Issue
#3487816
by catch, berdir, smustgrave, quietone: Ensure tests don't run twice
parent
3de28c0f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
core/scripts/run-tests.sh
+5
-5
5 additions, 5 deletions
core/scripts/run-tests.sh
with
5 additions
and
5 deletions
core/scripts/run-tests.sh
+
5
−
5
View file @
1b5e4160
...
@@ -946,16 +946,16 @@ function simpletest_script_get_test_list() {
...
@@ -946,16 +946,16 @@ function simpletest_script_get_test_list() {
foreach
(
$groups
as
$group
=>
$tests
)
{
foreach
(
$groups
as
$group
=>
$tests
)
{
$not_slow_tests
=
array_merge
(
$not_slow_tests
, array_keys
(
$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
// Filter slow tests out of the not slow tests
and ensure a unique list
// than one group.
//
since tests may appear
in
more
than one group.
$not_slow_tests
=
array_diff
(
$not_slow_tests
,
$slow_tests
)
;
$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
// If the tests are not being run
in
parallel,
then
ensure slow tests run
// all together first.
// all together first.
if
((
int
)
$args
[
'ci-parallel-node-total'
]
<
=
1
)
{
if
((
int
)
$args
[
'ci-parallel-node-total'
]
<
=
1
)
{
sort_tests_by_type_and_methods
(
$slow_tests
)
;
sort_tests_by_type_and_methods
(
$slow_tests
)
;
sort_tests_by_type_and_methods
(
$not_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
{
else
{
// Sort all tests by the number of public methods on the
test
class.
// Sort all tests by the number of public methods on the
test
class.
...
@@ -976,7 +976,7 @@ function simpletest_script_get_test_list() {
...
@@ -976,7 +976,7 @@ function simpletest_script_get_test_list() {
// And the same
for
the rest of the tests.
// And the same
for
the rest of the tests.
$binned_other_tests
=
place_tests_into_bins
(
$not_slow_tests
,
$bin_count
)
;
$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]
;
$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
{
else
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment