summaryrefslogtreecommitdiff
path: root/source/Test
diff options
context:
space:
mode:
authoradelon <22380201+adelon@users.noreply.github.com>2026-08-04 14:31:18 +0200
committeradelon <22380201+adelon@users.noreply.github.com>2026-08-04 14:31:18 +0200
commit4d046dfa58dff343f16a491264c9379a26c72931 (patch)
tree24b4358e33fa32a335b1a9c688d06e294fa9cfc2 /source/Test
parenta2a32439c30fb02c33d20ea4a71634d842a3c103 (diff)
Use two-worker Vampire portfolios by default
Diffstat (limited to 'source/Test')
-rw-r--r--source/Test/Unit/Provers.hs21
1 files changed, 13 insertions, 8 deletions
diff --git a/source/Test/Unit/Provers.hs b/source/Test/Unit/Provers.hs
index f0f0e8f..1caa97b 100644
--- a/source/Test/Unit/Provers.hs
+++ b/source/Test/Unit/Provers.hs
@@ -66,16 +66,21 @@ jobsSelectionTests =
jobsSelectionDetectedProcessors selected `shouldBe` Nothing
jobsSelectionWasOverridden selected `shouldBe` True
readIORef detectorCalled >>= (`shouldBe` False)
- , testCase "leaves one detected logical processor free" do
- selected <- selectEffectiveJobs Nothing (pure 8)
- jobsSelectionEffectiveJobs selected
- `shouldBe` positiveJobs 7
- jobsSelectionDetectedProcessors selected `shouldBe` Just 8
- jobsSelectionWasOverridden selected `shouldBe` False
+ , testCase "rounds automatic jobs to one third of detected processors" do
+ for_
+ [(8, 3), (16, 5), (24, 8), (32, 11)]
+ \(detected, expected) -> do
+ selected <- selectEffectiveJobs Nothing (pure detected)
+ jobsSelectionEffectiveJobs selected
+ `shouldBe` positiveJobs expected
+ jobsSelectionDetectedProcessors selected
+ `shouldBe` Just detected
+ jobsSelectionWasOverridden selected `shouldBe` False
, testCase "falls back to one after bad detection" do
nonPositive <- selectEffectiveJobs Nothing (pure 0)
jobsSelectionEffectiveJobs nonPositive
`shouldBe` positiveJobs 1
+ jobsSelectionDetectedProcessors nonPositive `shouldBe` Just 1
failed <- selectEffectiveJobs Nothing
(Exception.throwIO (userError "processor detection failed"))
jobsSelectionEffectiveJobs failed
@@ -117,14 +122,14 @@ vampireExecutorTests =
putMVar releaseFirst ()
firstCompletion <- awaitVampireRequest first
assertAcceptedRequest prepared firstCompletion
- , testCase "bounds live one-core processes" do
+ , testCase "bounds live two-worker Vampire invocations" do
prepared <- preparedTypedTask 0
withFakeVampire
[ "previous=''"
, "found=0"
, "for argument in \"$@\"; do"
, " if [ \"$previous\" = '--cores' ]; then"
- , " [ \"$argument\" = '1' ] || exit 17"
+ , " [ \"$argument\" = '2' ] || exit 17"
, " found=1"
, " fi"
, " previous=$argument"