Skip to content

Commit

Permalink
fix(shell): allow bench to be launched for the directory packaged by …
Browse files Browse the repository at this point in the history
…pack_tools on production environment (#1896)

#1895

Error occurred that config file was not found while launching Pegasus
bench. The reason is that the tools is packaged by pack_tools for
production environment, where build/latest/output could not be found
since it is only used for local test environment.
  • Loading branch information
empiredan committed Feb 5, 2024
1 parent 141a37d commit 597cc38
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1591,9 +1591,19 @@ function run_bench()
shift
done
cd ${ROOT}
cp ${BUILD_LATEST_DIR}/output/bin/pegasus_bench/config.ini ./config-bench.ini
if [ -f ${ROOT}/bin/pegasus_bench/pegasus_bench ]; then
# The pegasus_bench was packaged by pack_tools, to be used on production environment.
ln -s -f ${ROOT}/bin/pegasus_bench/pegasus_bench
cp -a ${ROOT}/bin/pegasus_bench/config.ini ./config-bench.ini
elif [ -f ${BUILD_LATEST_DIR}/output/bin/pegasus_bench/pegasus_bench ]; then
# The pegasus_bench was built locally, to be used for test on development environment.
ln -s -f ${BUILD_LATEST_DIR}/output/bin/pegasus_bench/pegasus_bench
cp -a ${BUILD_LATEST_DIR}/output/bin/pegasus_bench/config.ini ./config-bench.ini
else
echo "ERROR: pegasus_bench could not be found"
exit 1
fi
fill_bench_config
ln -s -f ${BUILD_LATEST_DIR}/output/bin/pegasus_bench/pegasus_bench
./pegasus_bench ./config-bench.ini
rm -f ./config-bench.ini
}
Expand Down

0 comments on commit 597cc38

Please sign in to comment.