Hadrian: use the testsuite driver's config.haddock arg more correctly

4 haddock tests assume that .haddock files have been produced, by using the
'req_haddock' modifier. The testsuite driver assumes that this condition is
satisfied if 'config.haddock' is non-empty, but before this patch Hadrian was
always passing the path to where the haddock executable should be, regardless
of whether it is actually there or not.

Instead, we now pass an empty config.haddock when we can't find all of
<build root>/docs/html/libraries/<pkg>/<pkg>.haddock>, where <pkg> ranges over
array, base, ghc-prim, process and template-haskell, and pass the path
to haddock when all those file exists. This has the (desired) effect of skipping
the 4 tests (marked as 'missing library') when the docs haven't been built,
and running the haddock tests when they have.
18 jobs for master in 234 minutes and 50 seconds (queued for 3 seconds)
Status Name Job ID Coverage
  Lint
passed lint-submods #69361
lint

00:00:11

 
  Build
passed hadrian-ghc-in-ghci #69363
x86_64-linux

00:10:05

failed validate-x86_64-linux-deb8-hadrian #69362
x86_64-linux allowed to fail

01:28:19

passed validate-x86_64-linux-deb9-debug #69364
x86_64-linux

00:49:40

 
  Full Build
failed validate-aarch64-linux-deb9 #69366
aarch64-linux allowed to fail

01:07:14

passed validate-i386-linux-deb9 #69367
x86_64-linux

00:58:15

passed validate-x86_64-darwin #69365
x86_64-darwin

00:58:53

passed validate-x86_64-linux-deb9 #69368
x86_64-linux

01:38:26

passed validate-x86_64-linux-deb9-integer-simple #69370
x86_64-linux

00:51:24

passed validate-x86_64-linux-deb9-llvm #69369
x86_64-linux

02:20:12

passed validate-x86_64-linux-deb9-unreg #69371
x86_64-linux

02:23:54

passed validate-x86_64-linux-fedora27 #69372
x86_64-linux

00:53:18

failed validate-x86_64-windows #69373
x86_64-windows allowed to fail

00:00:01

 
  Cleanup
passed cleanup-darwin #69375
x86_64-darwin

00:00:06

passed cleanup-windows #69374
x86_64-windows

00:00:37

 
  Packaging
failed doc-tarball #69376
x86_64-linux allowed to fail

00:01:21

 
  Hackage
manual hackage #69377
x86_64-linux allowed to fail manual
 
  Deploy
failed pages #69378
x86_64-linux allowed to fail

00:00:23

 
Name Stage Failure
failed
doc-tarball Packaging
Submodule path 'utils/hsc2hs': checked out 'efb556cc2689cae42abadae87d778ae20fbc0a14'
$ git checkout .gitmodules
$ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true
warning: no common commits
From https://gitlab.haskell.org/ghc/ghc-performance-notes
* [new ref] refs/notes/perf -> refs/notes/perf
$ if [ ! -f "$LINUX_BINDIST" ]; then # collapsed multi-line command
Error: ghc-x86_64-mingw32.tar.xz does not exist. Did the 64-bit Windows job fail?
ERROR: Job failed: exit code 1
failed
pages Deploy
$ git checkout .gitmodules
$ git fetch https://gitlab.haskell.org/ghc/ghc-performance-notes.git refs/notes/perf:refs/notes/perf || true
From https://gitlab.haskell.org/ghc/ghc-performance-notes
5d9e7b3ab5..85ad5887c8 refs/notes/perf -> refs/notes/perf
$ mkdir -p public/doc
$ tar -xf haddock.html.tar.xz -C public/doc
tar: haddock.html.tar.xz: Cannot open: No such file or directory
tar: Error is not recoverable: exiting now
ERROR: Job failed: exit code 1
failed
validate-x86_64-linux-deb8-hadrian Build
Exit code: 1
Stderr:
)


Uploading artifacts...
WARNING: ghc.tar.xz: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-aarch64-linux-deb9 Full Build
$ cp -Rf $HOME/.cabal cabal-cache
Uploading artifacts...
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit code 1
failed
validate-x86_64-windows Full Build
Runtime platform                                    arch=amd64 os=windows pid=5040 revision=7f00c780 version=11.5.1
WARNING: ghc-*.tar.xz: no matching files
WARNING: junit.xml: no matching files
ERROR: No files to upload
Uploading artifacts...
Runtime platform
arch=amd64 os=windows pid=2904 revision=7f00c780 version=11.5.1
WARNING: junit.xml: no matching files
ERROR: No files to upload
ERROR: Job failed: exit status 128