Skip to content
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions buildconfig/Jenkins/Conda/run-tests
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,13 @@ BUILD_THREADS=$6

XVFB_SERVER_NUM=101

# If this isn't specified for a Jenkins agent, revert to default value
# If this isn't specified for a machine, revert to default value
if [[ -z "$BUILD_THREADS_SYSTEM_TESTS" ]]; then
# Default to 3 system tests running in parallel, assuming builders have >= 32GB RAM
BUILD_THREADS_SYSTEM_TESTS=3
# Default to a 3/16 fraction of the build threads, e.g. 8 for a 32-core machine,
# to allow enough RAM for concurrently running system tests.
BUILD_THREADS_SYSTEM_TESTS=$(( BUILD_THREADS * 3 / 16 ))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you think we need to make sure this is an integer here? I'm just considering the STFC Cloud might change again and not have a nicely divisible number of cores.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This will do integer division, so will take the floor. However, thinking about it more, maybe we should use RAM to determine the system test threads. E.g. our Windows runners currently have 16GB RAM and 24 cores. With the above calculation, that would mean 4 system test threads, but we are currently limiting to 2. What do you think?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that's probably more sensible, since RAM is the bottleneck for the problem we're solving by restricting anyway.

# Ensure at least 1 thread
(( BUILD_THREADS_SYSTEM_TESTS < 1 )) && BUILD_THREADS_SYSTEM_TESTS=1
fi

# Jenkins nodes may specify the maximum number of unit tests to run in parallel.
Expand Down