@@ -30,6 +30,7 @@ print_help () {
3030RUNNING_TESTS=y
3131source $SCRIPT_DIR/build-lib.sh
3232
33+USE_GIT_CABAL=1
3334set_common_vars
3435COVERAGE=
3536MEASURE=1
@@ -106,11 +107,18 @@ target_exe_extra_args () {
106107
107108if test "$COVERAGE" -eq "1"
108109then
110+ # Used to determine the hpc tix dir
111+ PACKAGE_FULL_NAME=streamly-0.7.2
112+ case `uname` in
113+ Linux) SYSTEM=x86_64-linux ;;
114+ *) echo "Unsupported system"; exit 1 ;;
115+ esac
116+
109117 # With the --enable-coverage option the tests as well as the library get
110118 # compiled with -fhpc, and we get coverage for tests as well. But we want to
111119 # exclude that, so a project file is needed.
112120 CABAL_BUILD_OPTIONS+=" --project-file cabal.project.coverage"
113− mkdir -p $BUILD_DIR/coverage
121+ mkdir -p $BUILD_DIR/hpc
114122fi
115123BUILD_TEST="$CABAL_EXECUTABLE v2-build $CABAL_BUILD_OPTIONS --enable-tests"
116124
@@ -137,15 +145,10 @@ then
137145 TIXFILES=
138146 for i in $TARGETS
139147 do
140− TIXFILES+="$BUILD_DIR/coverage/${i}.tix "
148+ TIXFILES+="$(get_tix_file ${i}) "
141149 done
142150
143− case `uname` in
144− Linux) SYSTEM=x86_64-linux ;;
145− *) echo "Unsupported system"; exit 1 ;;
146− esac
147−
148− ALLTIX=$BUILD_DIR/coverage/all.tix
151+ ALLTIX=$BUILD_DIR/hpc/all.tix
149152 hpc sum --output=$ALLTIX $TIXFILES
150153 run_verbose hpc markup $ALLTIX --hpcdir \
151154 $BUILD_DIR/build/$SYSTEM/ghc-${GHC_VERSION}/streamly-0.7.2/hpc/vanilla/mix/streamly-0.7.2/