@@ -30,6 +30,7 @@ print_help () {
30RUNNING_TESTS=y
30RUNNING_TESTS=y
31source $SCRIPT_DIR/build-lib.sh
31source $SCRIPT_DIR/build-lib.sh
33set_common_vars
34set_common_vars
@@ -106,11 +107,18 @@ target_exe_extra_args () {
107if test "$COVERAGE" -eq "1"
108if test "$COVERAGE" -eq "1"
110+ # Used to determine the hpc tix dir
111+ PACKAGE_FULL_NAME=streamly-0.7.2
113+ Linux) SYSTEM=x86_64-linux ;;
114+ *) echo "Unsupported system"; exit 1 ;;
109 # With the --enable-coverage option the tests as well as the library get
117 # With the --enable-coverage option the tests as well as the library get
110 # compiled with -fhpc, and we get coverage for tests as well. But we want to
118 # compiled with -fhpc, and we get coverage for tests as well. But we want to
111 # exclude that, so a project file is needed.
119 # exclude that, so a project file is needed.
112 CABAL_BUILD_OPTIONS+=" --project-file cabal.project.coverage"
120 CABAL_BUILD_OPTIONS+=" --project-file cabal.project.coverage"
113− mkdir -p $BUILD_DIR/coverage
121+ mkdir -p $BUILD_DIR/hpc
115BUILD_TEST="$CABAL_EXECUTABLE v2-build $CABAL_BUILD_OPTIONS --enable-tests"
123BUILD_TEST="$CABAL_EXECUTABLE v2-build $CABAL_BUILD_OPTIONS --enable-tests"
@@ -137,15 +145,10 @@ then
137 TIXFILES=
145 TIXFILES=
138 for i in $TARGETS
146 for i in $TARGETS
140− TIXFILES+="$BUILD_DIR/coverage/${i}.tix "
148+ TIXFILES+="$(get_tix_file ${i}) "
144− Linux) SYSTEM=x86_64-linux ;;
145− *) echo "Unsupported system"; exit 1 ;;
148− ALLTIX=$BUILD_DIR/coverage/all.tix
151+ ALLTIX=$BUILD_DIR/hpc/all.tix
149 hpc sum --output=$ALLTIX $TIXFILES
152 hpc sum --output=$ALLTIX $TIXFILES
150 run_verbose hpc markup $ALLTIX --hpcdir \
153 run_verbose hpc markup $ALLTIX --hpcdir \
151 $BUILD_DIR/build/$SYSTEM/ghc-${GHC_VERSION}/streamly-0.7.2/hpc/vanilla/mix/streamly-0.7.2/
154 $BUILD_DIR/build/$SYSTEM/ghc-${GHC_VERSION}/streamly-0.7.2/hpc/vanilla/mix/streamly-0.7.2/