[GHC] #11958: Improved testing of cross-compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: task | Status: new Priority: low | Milestone: 8.2.1 Component: Test Suite | Version: 7.10.3 Keywords: cross-compile | Operating System: Unknown/Multiple Architecture: | Type of failure: None/Unknown Unknown/Multiple | Test Case: | Blocked By: Blocking: | Related Tickets: Differential Rev(s): | Wiki Page: -------------------------------------+------------------------------------- It is already possible to build cross compiler eg from x86_64/linux to armhf/linux or arm64/linux, but there is currently no way to run the test suite. However, at least for the host and targets above, it should be possible to run the test executables under the Qemu user space emulation. I know this works, because in my own personal jenkins build instance, I test exactly this by doing (for x86_64/linux to amr64/linux cross): {{{ echo -e 'main :: IO ()\nmain = putStrLn "Hello World"\n' > hello-world.hs inplace/bin/ghc-stage1 hello-world.hs -o hello-world test $(file hello-world | grep -c 'ARM aarch64, version 1') -eq 1 ./hello-world }}} The linux machine I run the above test on is x86_64/linux but has Qemu and `binfmt` stuff set up so that it can run some foreign binaries. For instance, if GHC worked as a Linux to Windows cross-compiler the resulting windows binaries should work under Wine. To get this working, I suspect that just about all the required work is in the build system. Not sure if it might not be better to wait until the Shake based build system is in better shape. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: Type: task | Status: new Priority: low | Milestone: 8.2.1 Component: Test Suite | Version: 7.10.3 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by erikd): @thomie suggested running `make test stage=1`. That failed because for some reason `hp2ps` doesn't get build during cross-compilation. If I remove the test for that program: {{{ diff --git a/testsuite/mk/boilerplate.mk b/testsuite/mk/boilerplate.mk index 077d503..64a7408 100644 --- a/testsuite/mk/boilerplate.mk +++ b/testsuite/mk/boilerplate.mk @@ -198,10 +198,10 @@ ifeq "$(shell test -x '$(HSC2HS)' && echo exists)" "" $(error Cannot find hsc2hs: $(HSC2HS)) endif -$(eval $(call canonicaliseExecutable,HP2PS_ABS)) -ifeq "$(shell test -x '$(HP2PS_ABS)' && echo exists)" "" -$(error Cannot find hp2ps: $(HP2PS_ABS)) -endif $(eval $(call canonicaliseExecutable,HPC)) ifeq "$(shell test -x '$(HPC)' && echo exists)" "" }}} then the tests do actually run (x86_64/linux cross compiling to armhf/linux): {{{ OVERALL SUMMARY for test run started at Sun Apr 24 20:40:22 2016 AEST 0:28:29 spent to go through 5128 total tests, which gave rise to 12346 test cases, of which 7884 were skipped 66 had missing libraries 4096 expected passes 157 expected failures 13 caused framework failures 9 unexpected passes 134 unexpected failures 0 unexpected stat failures }}} It seems some of these tests failed because the 64 bit `Word` results were expected instead of using the 32 bit `Word` expected results. This idea does seem promising. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958#comment:1 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: (none) Type: task | Status: new Priority: low | Milestone: 8.4.1 Component: Test Suite | Version: 7.10.3 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Comment (by bgamari): This is one goal of the new Jenkins CI infrastructure, see #13716. -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958#comment:3 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: (none) Type: task | Status: new Priority: low | Milestone: 8.4.1 Component: Test Suite | Version: 7.10.3 Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13716 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * related: => #13716 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958#comment:4 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: bgamari Type: task | Status: new Priority: low | Milestone: 8.4.1 Component: Continuous | Version: 7.10.3 Integration | Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13716 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * owner: (none) => bgamari * component: Test Suite => Continuous Integration * milestone: => 8.4.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958#comment:6 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: bgamari Type: task | Status: new Priority: low | Milestone: 8.6.1 Component: Continuous | Version: 7.10.3 Integration | Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13716 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.4.1 => 8.6.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958#comment:7 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler

#11958: Improved testing of cross-compiler -------------------------------------+------------------------------------- Reporter: erikd | Owner: bgamari Type: task | Status: new Priority: low | Milestone: 8.8.1 Component: Continuous | Version: 7.10.3 Integration | Resolution: | Keywords: cross-compile Operating System: Unknown/Multiple | Architecture: | Unknown/Multiple Type of failure: None/Unknown | Test Case: Blocked By: | Blocking: Related Tickets: #13716 | Differential Rev(s): Wiki Page: | -------------------------------------+------------------------------------- Changes (by bgamari): * milestone: 8.6.1 => 8.8.1 -- Ticket URL: http://ghc.haskell.org/trac/ghc/ticket/11958#comment:8 GHC http://www.haskell.org/ghc/ The Glasgow Haskell Compiler
participants (1)
-
GHC