source ${bamboo_build_working_directory}/asv/bin/activate
build_host="casa-perf-test"
cd ${bamboo_build_working_directory}/casabench
STATEMENT="synthesis.imager.memprofile.enable: 1"
CONFIG="/users/$USER/.casa/rc"
if [ ! -e "$CONFIG" ]; then
echo "No $CONFIG found, creating and populating"
touch "$CONFIG" && echo "$STATEMENT" > "$CONFIG"
elif [[ $(grep "synthesis.imager.memprofile.enable:" ~/.casa/rc | awk '{print $2}') == 0 ]]; then
echo "Modifying $CONFIG to match '$STATEMENT'" && sed -i .bak "s/synthesis.imager.memprofile.enable: 0/synthesis.imager.memprofile.enable: 1/" "$CONFIG"
echo "Confirming that $CONFIG contains '$STATEMENT'" && grep -qF -- "$STATEMENT" "$CONFIG" || echo "$STATEMENT" >> "$CONFIG"
if [ -f "./results/${build_host}/machine.json" ]
echo "Found existing results entry for this machine, proceeding"
echo "No entry found in results database for this category of agent, creating it"
asv machine --machine "${build_host}" --yes
if [ ! -z "${bamboo_wheel_version}" ]; then
wheel_version=${bamboo_wheel_version}
export wheel_version=$(ls ${bamboo_build_working_directory}/*whl | grep -E --only-matching "6(\.[0-9]+)+")
if [ ! -z "${bamboo_planRepository_branch_name}" ]; then
branch_name=$(echo ${bamboo_planRepository_branch_name} | grep -E --only-matching "\d{5}")
export branch_name=$(ls ${bamboo_build_working_directory}/*whl | grep -E --only-matching "\d{5}")
if [ ! -z "${bamboo_TagBuildTriggerReason_tagName}" ]; then