Skip to content
Snippets Groups Projects
  • Matthew Pickering's avatar
    ff7b4c10
    Test --working-dir in the testsuite · ff7b4c10
    Matthew Pickering authored
    When testing `./Setup` only, when `withDirectory` is used, instead of
    changing into that directory when invoking processes, we now use the
    `--working-dir` flag and keep a fixed CWD.
    
    This will therefore passively test that `--working-dir` is working
    
    In addition, it makes it possible to test things easily such as
    `--working-dir` with a relative path as an argument. `cabal-install`
    will only invoke `--working-dir` with an absolute path and hence is
    isolated from any double interpretation issues.
    
    Testing against these double interpretation issues is very important as
    it also prevents over-interpretation of relative paths into absolute
    paths. Passing absolute paths to tools such as hsc2hs can lead to the
    build directory leaking into an interface file which leads to
    non-reproducible results.
    ff7b4c10
    History
    Test --working-dir in the testsuite
    Matthew Pickering authored
    When testing `./Setup` only, when `withDirectory` is used, instead of
    changing into that directory when invoking processes, we now use the
    `--working-dir` flag and keep a fixed CWD.
    
    This will therefore passively test that `--working-dir` is working
    
    In addition, it makes it possible to test things easily such as
    `--working-dir` with a relative path as an argument. `cabal-install`
    will only invoke `--working-dir` with an absolute path and hence is
    isolated from any double interpretation issues.
    
    Testing against these double interpretation issues is very important as
    it also prevents over-interpretation of relative paths into absolute
    paths. Passing absolute paths to tools such as hsc2hs can lead to the
    build directory leaking into an interface file which leads to
    non-reproducible results.
Code owners
Assign users and groups as approvers for specific file changes. Learn more.
setup-external-ok.out 2.78 KiB