Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Sign in / Register
GHC
GHC
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 4,262
    • Issues 4,262
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 404
    • Merge Requests 404
  • Requirements
    • Requirements
    • List
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Security & Compliance
    • Security & Compliance
    • Dependency List
    • License Compliance
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Code Review
    • Insights
    • Issue
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • Glasgow Haskell Compiler
  • GHCGHC
  • Wiki
    • Building
    • Running tests
  • updating

Last edited by Peter Trommler Feb 20, 2020
Page history New page

updating

Updating test cases when the output changes

If the output of a test has changed, but the new output is still correct, you can automatically update the sample output to match the new output like so:

$ make accept TEST=<test-name>

where <test-name> is the name of the test.

If you want to update a whole directory of tests to accept the new output, simply call make accept in that directory:

$ cd array/should_run
$ make accept

make accept does not change the expected output of tests that are marked as expect_broken or expect_broken_for.

It is also possible to accept test changes only for a specific platform or os.

$ make accept TEST=<test-name> [OS=YES | PLATFORM=YES]

However please avoid this as much as possible and if applicable use a custom formatter to format the output in a platform neutral way. See e.g. normalise_errmsg_fun

Performance tests

Some of the performance tests in perf/ check for peak memory usage. Peak memory usage is obtained when there is a major GC, so the peak value can be vulnerable to the timing of major GC. If peak_megabytes appears to increase, try running with RTS -h -i0.01 before and after. That makes major GC happen more often, and gives a much more accurate result.

Clone repository

GHC Home
GHC User's Guide

Joining In

Newcomers info
Mailing Lists & IRC
The GHC Team

Documentation

GHC Status Info
Working conventions
Building Guide
Commentary

Wiki

Title Index
Recent Changes