benchmark-repository-rs/examples/test-job.sh
Patrick Lühne 3c2d03dc38
Start implementing new synchronization mechanism
This one is based on separate Git repositories for results.
2019-03-01 16:29:00 +01:00

38 lines
640 B
Bash
Executable File

#!/bin/bash
#SBATCH --nodes=1
#SBATCH --ntasks-per-node=1
#SBATCH --exclusive
#SBATCH --partition=kr
tmp_dir=/home/pluehne/tmp
mkdir -p "$tmp_dir"
dir="$tmp_dir"/"$JOB_BRANCH_NAME"
if [[ -d $dir ]]
then
rm -rf "$dir"
fi
mkdir -p "$dir"
pushd "$dir"
git clone "$GIT_REMOTE_URL" repository
pushd repository
git config user.name "Potassco Bot"
git config user.email "bot@potassco.org"
echo "$JOB_BRANCH_NAME" > test-output
sleep 10
start_time=$(date +%s%N)
git add test-output
git commit -m "Test update"
git push
end_time=$(date +%s%N)
popd
echo $(expr "$end_time" - "$start_time") >> "$tmp_dir"/overhead
popd