@@ -77,39 +77,17 @@ list_comparisons () {
7777 echo
7878}
7979
80−# chart is expensive to build and usually not required to be rebuilt
81−cabal_which_report() {
82− local path="./bin/$1"
83− if test -e "$path"
84− then
85− echo $path
86− fi
87−}
88−
89−find_report_prog() {
90− local prog_name="bench-report"
91− hash -r
92− local prog_path=$(cabal_which_report $prog_name)
93− if test -x "$prog_path"
94− then
95− echo $prog_path
96− else
97− return 1
98− fi
99−}
100−
10180build_report_prog() {
102− local prog_name="bench-report"
103− local prog_path=$(cabal_which_report $prog_name)
81+ local prog_path=$BENCH_REPORT_DIR/bin/bench-report
10482
10583 hash -r
10684 if test ! -x "$prog_path" -a "$BUILD_ONCE" = "0"
10785 then
10886 echo "Building bench-report executables"
10987 BUILD_ONCE=1
110− pushd $BENCHMARK_DIR/bench-report
88+ pushd $BENCH_REPORT_DIR
11189 local cmd
112− cmd="$CABAL_EXECUTABLE install --installdir $SCRIPT_DIR bench-report"
90+ cmd="$CABAL_EXECUTABLE install --installdir bin bench-report"
11391 if test "$USE_NIX" -eq 0
11492 then
11593 $cmd || die "bench-report build failed"
@@ -117,7 +95,6 @@ build_report_prog() {
11795 nix-shell --run "$cmd" || die "bench-report build failed"
11896 fi
11997 popd
120−
12198 elif test ! -x "$prog_path"
12299 then
123100 return 1
@@ -130,8 +107,8 @@ build_report_progs() {
130107 then
131108 build_report_prog || exit 1
132109 local prog
133− prog=$(find_report_prog) || \
134− die "Cannot find bench-report executable"
110+ prog=$BENCH_REPORT_DIR/bin/bench-report
111+ test -x $prog || die "Cannot find bench-report executable"
135112 echo "Using bench-report executable [$prog]"
136113 fi
137114}
@@ -426,8 +403,8 @@ run_measurements() {
426403
427404run_reports() {
428405 local prog
429− prog=$(find_report_prog) || \
430− die "Cannot find bench-graph executable"
406+ prog=$BENCH_REPORT_DIR/bin/bench-report
407+ test -x $prog || die "Cannot find bench-report executable"
431408 echo
432409
433410 for i in $1
@@ -445,8 +422,6 @@ run_reports() {
445422# Execution starts here
446423#-----------------------------------------------------------------------------
447424
448−cd $SCRIPT_DIR/..
449−
450425USE_GIT_CABAL=1 # This is used by set_common_vars
451426set_common_vars
452427