on master help sign in
fix cabal not finding benchmark executables
commit6fd821cedcde74538bcb7eb41a9c0eafb9969ae0 authorHarendra Kumar <harendra.kumar@gmail.com> dateThu 27 Jun 2019, 15:25 (7 years ago) parente59830b
1 file changed+9−1
bench.sh+9−1
bench.sh+9−1
@@ -248,6 +248,12 @@ GAUGE_ARGS=
248248BUILD_ONCE=0
249249USE_STACK=0
250250
251+GHC_VERSION=$(ghc --numeric-version)
252+
253+cabal_which() {
254+ find dist-newstyle -type f -path "*${GHC_VERSION}*/$1"
255+}
256+
251257if test "$USE_STACK" = "1"
252258then
253259 WHICH_COMMAND="stack exec which"
@@ -255,7 +261,9 @@ then
255261 GET_BENCH_PROG=stack_bench_prog
256262 BUILD_BENCH="stack build $STACK_BUILD_FLAGS --bench --no-run-benchmarks"
257263else
258− WHICH_COMMAND="cabal v2-exec which"
264+ # XXX cabal issue "cabal v2-exec which" cannot find benchmark/test executables
265+ #WHICH_COMMAND="cabal v2-exec which"
266+ WHICH_COMMAND=cabal_which
259267 BUILD_CHART_EXE="cabal v2-build --flags dev chart"
260268 GET_BENCH_PROG=cabal_bench_prog
261269 BUILD_BENCH="cabal v2-build $CABAL_BUILD_FLAGS --enable-benchmarks"