Skip to content

Commit 2c19bf3

Browse files
mpickeringMikolaj
authored andcommitted
Add a test to check that extra-prog-path is honoured for local packages
Whilst fixing #10692, I realised there was also this bug where extra-prog-path would not be honoured for specific packages. The idea behind extra-prog-path is that each local package can use a different version of a preprocessor if desired.
1 parent 24f8395 commit 2c19bf3

File tree

11 files changed

+76
-0
lines changed

11 files changed

+76
-0
lines changed
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
packages: client
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
This file is deliberately an invalid .x file,
2+
to ensure that we pick up the local alex script rather than
3+
any system-wide alex executable.
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
name: client
2+
version: 0.1.0.0
3+
synopsis: Checks build-tool-depends are put in PATH
4+
license: BSD3
5+
category: Testing
6+
build-type: Simple
7+
cabal-version: >=1.10
8+
9+
executable hello-world
10+
main-is: Hello.hs
11+
build-depends: base
12+
default-language: Haskell2010
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
#! /usr/bin/env bash
2+
3+
echo "I am not the alex you are looking for"
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
path = "FINDSH/sh.exe"
2+
args = "SCRIPTSDIR/alex"
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
#! /usr/bin/env bash
2+
3+
echo "I am the alex you are looking for"
4+
echo "module Main where main = print ()" > $3
Binary file not shown.
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
path = "FINDSH/sh.exe"
2+
args = "SCRIPTS2DIR/alex"
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# cabal v2-build
2+
Configuration is affected by the following files:
3+
- cabal.project
4+
Resolving dependencies...
5+
Build profile: -w ghc-<GHCVER> -O1
6+
In order, the following will be built:
7+
- client-0.1.0.0 (exe:hello-world) (first run)
8+
Configuring executable 'hello-world' for client-0.1.0.0...
9+
Preprocessing executable 'hello-world' for client-0.1.0.0...
10+
Building executable 'hello-world' for client-0.1.0.0...

0 commit comments

Comments
 (0)