[commit: ghc] master: Fix GhostScript detection (Trac #15856) (011e39d)

git at git.haskell.org git at git.haskell.org
Thu Nov 22 18:42:47 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : master
Link       : http://ghc.haskell.org/trac/ghc/changeset/011e39d7fe533ca772beeed8529749c4750d4817/ghc

>---------------------------------------------------------------

commit 011e39d7fe533ca772beeed8529749c4750d4817
Author: Krzysztof Gogolewski <krz.gogolewski at gmail.com>
Date:   Thu Nov 22 11:32:55 2018 -0500

    Fix GhostScript detection (Trac #15856)
    
    The option `confdir` (used in GhostScript test) was set correctly
    via `--config` in `test.mk` and incorrectly via `config/ghc`.
    AFAICT, some time ago this was working because the
    incorrect assignment was done first, and later it broke.
    
    Hardian doesn't pass `confdir`. I removed `confdir` and use
    `config.top` to determine the directory of the
    `good.ps` and `bad.ps` files. This is simpler.
    
    I also removed some redundant assignments in `config/ghc`.
    
    Test Plan: manually set config.have_profiling and make test
    
    Reviewers: bgamari
    
    Subscribers: rwbarton, carter
    
    GHC Trac Issues: #15856
    
    Differential Revision: https://phabricator.haskell.org/D5298


>---------------------------------------------------------------

011e39d7fe533ca772beeed8529749c4750d4817
 testsuite/config/ghc        | 7 -------
 testsuite/driver/testlib.py | 4 ++--
 testsuite/mk/test.mk        | 4 +---
 3 files changed, 3 insertions(+), 12 deletions(-)

diff --git a/testsuite/config/ghc b/testsuite/config/ghc
index eae88ed..247ddb8 100644
--- a/testsuite/config/ghc
+++ b/testsuite/config/ghc
@@ -4,15 +4,8 @@ import re
 #
 # This file is Python source
 #
-config.compiler              = 'ghc'
 config.compiler_always_flags = ghc_compiler_always_flags.split()
 
-config.haddock               = 'haddock'
-config.hp2ps                 = 'hp2ps'
-config.hpc                   = 'hpc'
-config.gs                    = 'gs'
-config.confdir               = '.'
-
 # By default, the 'normal' and 'hpc' ways are enabled. In addition, certain
 # ways are enabled automatically if this GHC supports them. Ways that fall in
 # this group are 'optasm', 'optllvm', 'profasm', 'threaded1', 'threaded2',
diff --git a/testsuite/driver/testlib.py b/testsuite/driver/testlib.py
index 761ba67..b2f14d1 100644
--- a/testsuite/driver/testlib.py
+++ b/testsuite/driver/testlib.py
@@ -1921,9 +1921,9 @@ global gs_working
 gs_working = False
 if config.have_profiling:
   if config.gs != '':
-    resultGood = runCmd(genGSCmd(config.confdir + '/good.ps'));
+    resultGood = runCmd(genGSCmd(config.top + '/config/good.ps'));
     if resultGood == 0:
-        resultBad = runCmd(genGSCmd(config.confdir + '/bad.ps') +
+        resultBad = runCmd(genGSCmd(config.top + '/config/bad.ps') +
                                    ' >/dev/null 2>&1')
         if resultBad != 0:
             print("GhostScript available for hp2ps tests")
diff --git a/testsuite/mk/test.mk b/testsuite/mk/test.mk
index 65e897d..6c995a4 100644
--- a/testsuite/mk/test.mk
+++ b/testsuite/mk/test.mk
@@ -25,8 +25,7 @@ export MAKE
 
 RUNTESTS     = $(TOP)/driver/runtests.py
 COMPILER     = ghc
-CONFIGDIR    = $(TOP)/config
-CONFIG       = $(CONFIGDIR)/$(COMPILER)
+CONFIG       = $(TOP)/config/$(COMPILER)
 
 ifeq "$(GhcUnregisterised)" "YES"
     # Otherwise C backend generates many warnings about
@@ -243,7 +242,6 @@ endif
 RUNTEST_OPTS +=  \
 	--rootdir=. \
 	--config-file=$(CONFIG) \
-	-e 'config.confdir="$(CONFIGDIR)"' \
 	-e 'config.platform="$(TARGETPLATFORM)"' \
 	-e 'config.os="$(TargetOS_CPP)"' \
 	-e 'config.arch="$(TargetARCH_CPP)"' \



More information about the ghc-commits mailing list