Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC
Commits:
-
1ddd3438
by Simon Jakobi at 2026-07-24T13:54:40-04:00
-
878455b2
by Duncan Coutts at 2026-07-24T13:54:41-04:00
-
f0ae5111
by Cheng Shao at 2026-07-24T13:54:42-04:00
2 changed files:
Changes:
| ... | ... | @@ -23,6 +23,10 @@ variables: |
| 23 | 23 | # Always start with a fresh clone to avoid non-hermetic builds
|
| 24 | 24 | GIT_STRATEGY: clone
|
| 25 | 25 | |
| 26 | + # Shallow submodule clones. Overridden by individual jobs that need deeper
|
|
| 27 | + # submodule history.
|
|
| 28 | + GIT_SUBMODULE_DEPTH: 1
|
|
| 29 | + |
|
| 26 | 30 | # Overridden by individual jobs
|
| 27 | 31 | CONFIGURE_ARGS: ""
|
| 28 | 32 | |
| ... | ... | @@ -262,7 +266,8 @@ lint-changelog: |
| 262 | 266 | GIT_SUBMODULE_STRATEGY: none
|
| 263 | 267 | before_script:
|
| 264 | 268 | - export PATH="/opt/toolchain/bin:$PATH"
|
| 265 | - - git config --global --add safe.directory "$CI_PROJECT_DIR"
|
|
| 269 | + # workaround for docker permissions
|
|
| 270 | + - sudo chown ghc:ghc -R .
|
|
| 266 | 271 | script:
|
| 267 | 272 | - .gitlab/ci.sh lint_changelog
|
| 268 | 273 | dependencies: []
|
| ... | ... | @@ -279,6 +284,9 @@ lint-linters: |
| 279 | 284 | variables:
|
| 280 | 285 | GIT_DEPTH: 1
|
| 281 | 286 | GIT_SUBMODULE_STRATEGY: none
|
| 287 | + before_script:
|
|
| 288 | + # workaround for docker permissions
|
|
| 289 | + - sudo chown ghc:ghc -R .
|
|
| 282 | 290 | script:
|
| 283 | 291 | - mypy testsuite/tests/linters/regex-linters/*.py
|
| 284 | 292 | dependencies: []
|
| ... | ... | @@ -290,6 +298,9 @@ lint-testsuite: |
| 290 | 298 | variables:
|
| 291 | 299 | GIT_DEPTH: 1
|
| 292 | 300 | GIT_SUBMODULE_STRATEGY: none
|
| 301 | + before_script:
|
|
| 302 | + # workaround for docker permissions
|
|
| 303 | + - sudo chown ghc:ghc -R .
|
|
| 293 | 304 | script:
|
| 294 | 305 | - make -Ctestsuite list_broken TEST_HC=$GHC
|
| 295 | 306 | dependencies: []
|
| ... | ... | @@ -301,6 +312,9 @@ typecheck-testsuite: |
| 301 | 312 | variables:
|
| 302 | 313 | GIT_DEPTH: 1
|
| 303 | 314 | GIT_SUBMODULE_STRATEGY: none
|
| 315 | + before_script:
|
|
| 316 | + # workaround for docker permissions
|
|
| 317 | + - sudo chown ghc:ghc -R .
|
|
| 304 | 318 | script:
|
| 305 | 319 | - mypy testsuite/driver/runtests.py
|
| 306 | 320 | dependencies: []
|
| ... | ... | @@ -313,6 +327,7 @@ typecheck-testsuite: |
| 313 | 327 | extends: .lint-params
|
| 314 | 328 | variables:
|
| 315 | 329 | BUILD_FLAVOUR: default
|
| 330 | + GIT_SUBMODULE_DEPTH: 0 # full history
|
|
| 316 | 331 | script:
|
| 317 | 332 | - .gitlab/ci.sh configure
|
| 318 | 333 | - .gitlab/ci.sh run_hadrian stage0:exe:lint-submodule-refs
|
| ... | ... | @@ -330,6 +345,9 @@ lint-author: |
| 330 | 345 | extends: .lint
|
| 331 | 346 | variables:
|
| 332 | 347 | GIT_SUBMODULE_STRATEGY: none
|
| 348 | + before_script:
|
|
| 349 | + # workaround for docker permissions
|
|
| 350 | + - sudo chown ghc:ghc -R .
|
|
| 333 | 351 | script:
|
| 334 | 352 | - git fetch "$CI_MERGE_REQUEST_PROJECT_URL" $CI_MERGE_REQUEST_TARGET_BRANCH_NAME
|
| 335 | 353 | - base="$(git merge-base FETCH_HEAD $CI_COMMIT_SHA)"
|
| 1 | 1 | module Main where
|
| 2 | 2 | |
| 3 | 3 | import Control.Concurrent
|
| 4 | +import Control.Exception
|
|
| 5 | +import Control.Monad
|
|
| 4 | 6 | import System.IO
|
| 7 | +import System.IO.Error
|
|
| 5 | 8 | import System.Process
|
| 6 | 9 | |
| 7 | 10 | main :: IO ()
|
| ... | ... | @@ -9,14 +12,24 @@ main = do (_,Just hout,_,p) <- createProcess (proc "./T3994app" ["start", "10000 |
| 9 | 12 | { std_out = CreatePipe, create_group = True }
|
| 10 | 13 | start <- hGetLine hout
|
| 11 | 14 | putStrLn start
|
| 12 | - interruptProcessGroupOf p
|
|
| 13 | - t <- myThreadId
|
|
| 14 | - -- timeout
|
|
| 15 | - forkIO $ do
|
|
| 16 | - threadDelay 5000000
|
|
| 17 | - putStrLn "Interrupting a Running Process Failed"
|
|
| 18 | - hFlush stdout
|
|
| 19 | - killThread t
|
|
| 20 | - waitForProcess p
|
|
| 15 | + |
|
| 16 | + -- On FreeBSD if we're _really_ unlucky with scheduling, then the
|
|
| 17 | + -- call to interruptProcessGroupOf can fail due to the process
|
|
| 18 | + -- having already terminated (despite it running for at least 10ms!)
|
|
| 19 | + -- If so, we just skip doing anything rather than fail the test,
|
|
| 20 | + -- since this isn't our fault and is rare and scheduling dependent.
|
|
| 21 | + -- See #27512 and https://reviews.freebsd.org/D58393
|
|
| 22 | + handleJust (guard . isDoesNotExistError) (\_ -> return ()) $ do
|
|
| 23 | + interruptProcessGroupOf p
|
|
| 24 | + t <- myThreadId
|
|
| 25 | + -- timeout
|
|
| 26 | + forkIO $ do
|
|
| 27 | + threadDelay 5000000
|
|
| 28 | + putStrLn "Interrupting a Running Process Failed"
|
|
| 29 | + hFlush stdout
|
|
| 30 | + killThread t
|
|
| 31 | + waitForProcess p
|
|
| 32 | + return ()
|
|
| 33 | + |
|
| 21 | 34 | putStrLn "end"
|
| 22 | 35 | return () |