# Copyright (c) Microsoft Corporation.
# Licensed under the MIT License.

[[profile.default.overrides]]
filter = 'package(~vmm_tests)'
# Mark VMM tests as heavy and requiring more threads due to their memory and CPU
# usage. For local dev runs, you may need to manually restrict the number of
# threads running via the -j cli arg.
threads-required = 3

[[profile.default.overrides]]
# use fuzzy-matching for the package() to allow out-of-tree tests to use the
# same profile
filter = 'package(~vmm_tests) and test(openhcl)'
# Mark OpenHCL VMM tests as extra heavy, as they have to also run VTL2.
threads-required = 6

[[profile.default.overrides]]
# use fuzzy-matching for the package() to allow out-of-tree tests to use the
# same profile
filter = 'package(~vmm_tests) and test(heavy)'
# Mark heavy tests as extra heavy, as they include up to 16 vps.
threads-required = 24

# Profile for CI runs.
[profile.ci]
# Set the default timeout to 1 second, with tests terminated after 10 seconds
slow-timeout = { period = "1s", terminate-after = 10 }
# Print out output for failing tests at the end of the run.
failure-output = "final"
# Do not cancel the test run on the first failure.
fail-fast = false

[profile.ci.junit]
path = "junit.xml"
store-success-output = "true"

[[profile.ci.overrides]]
# allow loom based tests more time, as they take a while
filter = 'test(loom)'
slow-timeout = { period = "30s", terminate-after = 2 }

[[profile.ci.overrides]]
# use fuzzy-matching for the package() to allow out-of-tree tests to use the
# same profile
filter = 'package(~vmm_tests)'
# VMM tests contain their own watchdog timer, but keep an extra long timer
# here as a backup.
slow-timeout = { period = "15m", terminate-after = 1 }
