Skip to content

GitLab

  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
  • GHC GHC
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,865
    • Issues 4,865
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
  • Merge requests 455
    • Merge requests 455
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Glasgow Haskell Compiler
  • GHCGHC
  • Issues
  • #21358
Closed
Open
Created Apr 07, 2022 by Matthew Pickering@mpickeringDeveloper

Using set -e in .gitlab/ci.sh doesn't work as intended

If you check the CI log you will find this section of the log from test_hadrian:

=====> 2 of 2 [0, 0, 0]
=====> 2 of 2 [0, 0, 0]
Compile failed (exit code 127) errors were:
/bin/sh: 1: /builds/ghc/ghc/_build/stage1-test/bin/ghc: not found

*** unexpected failure for T2632(normal)
Compile failed (exit code 127) errors were:
/bin/sh: 1: /builds/ghc/ghc/_build/stage1-test/bin/ghc: not found

*** unexpected failure for T13609(normal)

Performance Metrics (test environment: x86_64-linux-deb10-perf):


None collected.


Unexpected results from:
TEST="T13609 T2632"

SUMMARY for test run started at Wed Apr  6 18:01:47 2022 
0:00:00.017100 spent to go through
       2 total tests, which gave rise to
       8 test cases, of which
       6 were skipped
       0 had missing libraries

       0 expected passes
       0 expected failures

       0 caused framework failures
       0 caused framework warnings
       0 unexpected passes
       2 unexpected failures
       0 unexpected stat failures
       0 fragile tests

Unexpected failures:
   /builds/ghc/ghc/tmp/ghctest-hxd2n5g5/test   spaces/testsuite/tests/stage1/T13609.run  T13609 [exit code non-0] (normal)
   /builds/ghc/ghc/tmp/ghctest-hxd2n5g5/test   spaces/testsuite/tests/stage1/T2632.run   T2632 [exit code non-0] (normal)

Appending 0 stats to file: /builds/ghc/ghc/performance-metrics.tsv
user error (tests failed)
Build failed.
[0;31mhadrian/build-cabal --flavour=perf -j8 --broken-test= --bignum=gmp test --test-root-dirs=testsuite/tests/stage1 --test-compiler=stage1 runtest.opts+=--ignore-perf-failures=all failed[0m
[1;34mRunning *@...[0m
/builds/ghc/ghc/.gitlab/common.sh: line 48: *@: command not found
[0;31m*@ failed[0m
[1;34mRunning *@...[0m
/builds/ghc/ghc/.gitlab/common.sh: line 48: *@: command not found
[0;31m*@ failed[0m
[1 of 2] Compiling Main             ( proftest.hs, proftest.o )
[2 of 2] Linking proftest
[1;34mRunning hadrian/build-cabal --flavour=perf -j8 --broken-test= --bignum=gmp test --summary-junit=./junit.xml --test-have-intree-files --test-compiler=/builds/ghc/ghc/_build/install/bin/ghc runtest.opts+=--ignore-perf-failures=all...[0m

What is happening here:

  1. We run the stage1 tests which fail (#21072 (closed))
  2. There is this error /builds/ghc/ghc/.gitlab/common.sh: line 48: *@: command not found, which is caused by a bug in the shell function.

So three different commands fail here but are not caught by set -e, the solution appears to be add explicit error handling to the commands which may fail. (http://mywiki.wooledge.org/BashFAQ/105)

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information
Assignee
Assign to
Time tracking