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,274
    • Issues 4,274
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
    • Iterations
  • Merge Requests 412
    • Merge Requests 412
  • 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
  • Issues
  • #11980

Closed
Open
Opened Apr 26, 2016 by thomie@trac-thomie

Testsuite: run each test in its own /tmp directory, after copying required files

Plan

For each TEST:

  • create a directory <testdir> inside /tmp
  • link/copy all source files that the test needs into <testdir>
  • run the test inside <testdir>
  • delete <testdir>

Benefits

  • running tests in parallel always works, even when two tests write to the same file (for example .hi/.o files, from sharing a .hs file). This should reduce the number of unsuspected and annoying validate failures. There is no longer any need to specify -outputdir explicitly.
  • there is no longer any need to add entries to the perpetually out-of-date testsuite/.gitignore.
  • there is no longer any need to specify extra_clean or clean_cmd setup functions for tests. Sometimes you //will// have to specify which extra files a test needs, using the (new) extra_files setup function, but it will be immediately clear when to do so (i.e. the test won't run if you don't). By default only files with the name <testname>* are copied to <testdir>.
  • it could become possible to run //ways// for a single test in parallel (i.e. make TEST=<testname> slow would become faster)
  • cleaning the testsuite won't be necessary (except for a few files in testsuite/mk perhaps)

Currently the only way to clean the testsuite is via make CLEANUP=1 CLEAN_ONLY=1, which requires a call to the testsuite, which requires building mk/ghc-config first. This will all become much simpler.

Edited Mar 10, 2019 by thomie
Assignee
Assign to
8.2.1
Milestone
8.2.1 (Past due)
Assign milestone
Time tracking
None
Due date
None
Reference: ghc/ghc#11980