[GHC] #10441: msys native python testsuite support doesn't work in some situations

GHC ghc-devs at haskell.org
Sat May 23 20:39:40 UTC 2015


#10441: msys native python testsuite support doesn't work in some situations
-------------------------------------+-------------------------------------
        Reporter:  ezyang            |                   Owner:
            Type:  bug               |                  Status:  new
        Priority:  high              |               Milestone:  7.12.1
       Component:  Test Suite        |                 Version:  7.11
      Resolution:                    |                Keywords:
Operating System:  Windows           |            Architecture:
 Type of failure:  None/Unknown      |  Unknown/Multiple
      Blocked By:                    |               Test Case:
 Related Tickets:                    |                Blocking:
                                     |  Differential Revisions:
-------------------------------------+-------------------------------------

Comment (by thomie):

 I partially understand what's going on.

 In commit 5258566ee5c89aa757b0cf1433169346319c018f I simplified the string
 formatting and program path quoting in the testsuite driver. One change is
 that the path of the GHC executable  is now double quoted instead of
 single quoted.

 (This is done before it reaches the Python part of the testsuite driver,
 in `mk/test.mk`. I just noticed an unrelated bug here with empty program
 paths, which I'll fix shortly).

 This change is apparently not compatible with the escaping that
 `passThroughCmd` does.
 Before (good):

 {{{
 #!python
 >> passThroughCmd(["timeout", "300", "cd . && 'inplace/ghc-stage2' -c
 foo"])[2]
 timeout "300" "cd . && 'inplace/ghc-stage2' -c foo"
 }}}

 After (bad):

 {{{
 #!python
 >> passThroughCmd(['timeout', '300', 'cd . && "inplace/ghc-stage2" -c
 foo'])[2]
 timeout "300" "cd . && "inplace/ghc-stage2" -c foo"
 }}}



 If everything works after removing the function `passThroughCmd`
 introduced in 101c62e26286353dd3fac1ef54323529b64c9902, I suggest doing
 that.

 > # When running under native msys Python, any invocations of non-msys
 binaries,
 > # including timeout.exe, will have their arguments munged according to
 some
 > # heuristics

 Maybe the heuristics changed in a new version of msys, or the change from
 single quoting to double quoting somehow effects it?.

 Otherwise changing `'"%s"'` to `"'%s'"` might work.

--
Ticket URL: <http://ghc.haskell.org/trac/ghc/ticket/10441#comment:3>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler


More information about the ghc-tickets mailing list