Ticket #9221: test-ghc-cabal.sh

File test-ghc-cabal.sh, 515 bytes (added by slyfox, 3 years ago)

a good benchmark for cabal build

Line 
1#!/bin/bash
2
3set -e
4
5dd=ghc-cabal-build-test
6
7for j in `seq 1 16`; do
8
9  rm -rf -- "$dd"
10  mkdir -p "$dd"
11
12  ln -s ../utils/ghc-cabal/Main.hs "$dd"/
13  lndir ../libraries/Cabal/Cabal "$dd"/ >/dev/null
14
15  echo "RUN jobs: $j" >&2
16  echo "RUN jobs: $j"
17  time { time ./inplace/bin/ghc-stage2 "$@" \
18    --make \
19    -j${j} \
20    -hide-all-packages \
21    -package={array,base,bytestring,containers,deepseq,directory,filepath,pretty,process,time,unix} \
22    \
23    -O1 \
24    -i"$dd" \
25    \
26    "$dd"/Main.hs; } 2>&1
27done