[GHC] #10126: Test framework should not assume that GHC tools are in the same directory as GHC itself

#10126: Test framework should not assume that GHC tools are in the same directory as GHC itself -------------------------------------+------------------------------------- Reporter: Rufflewind | Owner: Rufflewind Type: feature | Status: new request | Milestone: Priority: normal | Version: 7.8.4 Component: Test Suite | Operating System: Unknown/Multiple Keywords: test | Type of failure: Other framework makefile | Blocked By: Architecture: | Related Tickets: Unknown/Multiple | Test Case: | Blocking: | Differential Revisions: | -------------------------------------+------------------------------------- The GHC test framework assumes that the GHC tools (`ghc-pkg`, `runghc`, `hsc2hs`, etc) are always in the same directory as `ghc` itself While this is probably a safe assumption for "in-tree" compilers, it's not necessarily true for "out-of-tree" compilers. For example, I currently have a thin wrapper of `ghc` in `$HOME/bin/ghc`, which causes the test framework to think that `ghc-pkg` is in `$HOME/bin/ghc-pkg`. I think the restriction should be relaxed as long as `TEST_HC` is not specified and an out-of-tree compiler is used. I suggest changing `testsuite/mk/boilerplate.mk` in the following way: {{{#!patch @@ -56,6 +56,7 @@ TEST_HC := $(STAGE2_GHC) endif else +implicit_compiler = YES IN_TREE_COMPILER = NO TEST_HC := $(shell which ghc) endif @@ -87,24 +88,30 @@ endif # containing spaces BIN_ROOT = $(shell dirname '$(TEST_HC)') +ifeq "$(implicit_compiler)" "YES" +find_tool = $(shell which $(1)) +else +find_tool = $(BIN_ROOT)/$(1) +endif + ifeq "$(GHC_PKG)" "" -GHC_PKG := $(BIN_ROOT)/ghc-pkg +GHC_PKG := $(call find_tool,ghc-pkg) endif ifeq "$(RUNGHC)" "" -RUNGHC := $(BIN_ROOT)/runghc +RUNGHC := $(call find_tool,runghc) endif ifeq "$(HSC2HS)" "" -HSC2HS := $(BIN_ROOT)/hsc2hs +HSC2HS := $(call find_tool,hsc2hs) endif ifeq "$(HP2PS_ABS)" "" -HP2PS_ABS := $(BIN_ROOT)/hp2ps +HP2PS_ABS := $(call find_tool,hp2ps) endif ifeq "$(HPC)" "" -HPC := $(BIN_ROOT)/hpc +HPC := $(call find_tool,hpc) endif $(eval $(call canonicaliseExecutable,TEST_HC)) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10126 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10126: Test framework should not assume that GHC tools are in the same directory as GHC itself -------------------------------------+------------------------------------- Reporter: Rufflewind | Owner: Rufflewind Type: feature request | Status: patch Priority: normal | Milestone: 7.12.1 Component: Test Suite | Version: 7.8.4 Resolution: | Keywords: test Operating System: Unknown/Multiple | framework makefile Type of failure: Other | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D705 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => patch * differential: => Phab:D705 * milestone: => 7.12.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10126#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10126: Test framework should not assume that GHC tools are in the same directory
as GHC itself
-------------------------------------+-------------------------------------
Reporter: Rufflewind | Owner: Rufflewind
Type: feature request | Status: patch
Priority: normal | Milestone: 7.12.1
Component: Test Suite | Version: 7.8.4
Resolution: | Keywords: test
Operating System: Unknown/Multiple | framework makefile
Type of failure: Other | Architecture:
Blocked By: | Unknown/Multiple
Related Tickets: | Test Case:
| Blocking:
| Differential Revisions: Phab:D705
-------------------------------------+-------------------------------------
Comment (by Austin Seipp

#10126: Test framework should not assume that GHC tools are in the same directory as GHC itself -------------------------------------+------------------------------------- Reporter: Rufflewind | Owner: Rufflewind Type: feature request | Status: closed Priority: normal | Milestone: 7.12.1 Component: Test Suite | Version: 7.8.4 Resolution: fixed | Keywords: test Operating System: Unknown/Multiple | framework makefile Type of failure: Other | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D705 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: patch => closed * resolution: => fixed Comment: Merged, thanks! -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10126#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10126: Test framework should not assume that GHC tools are in the same directory as GHC itself -------------------------------------+------------------------------------- Reporter: Rufflewind | Owner: Type: feature request | Status: new Priority: normal | Milestone: 7.12.1 Component: Test Suite | Version: 7.8.4 Resolution: | Keywords: test Operating System: Unknown/Multiple | framework makefile Type of failure: Other | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D705 -------------------------------------+------------------------------------- Changes (by thomie): * owner: Rufflewind => * status: closed => new * resolution: fixed => -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10126#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10126: Test framework should not assume that GHC tools are in the same directory as GHC itself -------------------------------------+------------------------------------- Reporter: Rufflewind | Owner: Type: feature request | Status: merge Priority: normal | Milestone: 7.10.2 Component: Test Suite | Version: 7.8.4 Resolution: | Keywords: test Operating System: Unknown/Multiple | framework makefile Type of failure: Other | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D705 -------------------------------------+------------------------------------- Changes (by thomie): * status: new => merge * milestone: 7.12.1 => 7.10.2 Comment: This commit is also needed to make the two in #10449 function properly. That changes the test failures in `perf/haddock` from: {{{ 3 had missing libraries }}} To the correct (on my local devel2 build): {{{ 3 unexpected stat failures ... . haddock.Cabal [stat not good enough] (normal) . haddock.base [stat not good enough] (normal) . haddock.compiler [stat not good enough] (normal) }}} -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10126#comment:5 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#10126: Test framework should not assume that GHC tools are in the same directory as GHC itself -------------------------------------+------------------------------------- Reporter: Rufflewind | Owner: Type: feature request | Status: closed Priority: normal | Milestone: 7.10.2 Component: Test Suite | Version: 7.8.4 Resolution: fixed | Keywords: test Operating System: Unknown/Multiple | framework makefile Type of failure: Other | Architecture: Blocked By: | Unknown/Multiple Related Tickets: | Test Case: | Blocking: | Differential Revisions: Phab:D705 -------------------------------------+------------------------------------- Changes (by thoughtpolice): * status: merge => closed * resolution: => fixed Comment: Merged to `ghc-7.10`. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/10126#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC