summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/contrib/build-perf-test-wrapper.sh11
1 files changed, 11 insertions, 0 deletions
diff --git a/scripts/contrib/build-perf-test-wrapper.sh b/scripts/contrib/build-perf-test-wrapper.sh
index e03ea978b9..a4c19290a7 100755
--- a/scripts/contrib/build-perf-test-wrapper.sh
+++ b/scripts/contrib/build-perf-test-wrapper.sh
@@ -67,6 +67,17 @@ if [ $# -ne 0 ]; then
67 exit 1 67 exit 1
68fi 68fi
69 69
70# Open a file descriptor for flock and acquire lock
71LOCK_FILE="/tmp/oe-build-perf-test-wrapper.lock"
72if ! exec 3> "$LOCK_FILE"; then
73 echo "ERROR: Unable to open lock file"
74 exit 1
75fi
76if ! flock -n 3; then
77 echo "ERROR: Another instance of this script is running"
78 exit 1
79fi
80
70echo "Running on `uname -n`" 81echo "Running on `uname -n`"
71if ! git_topdir=$(git rev-parse --show-toplevel); then 82if ! git_topdir=$(git rev-parse --show-toplevel); then
72 echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`" 83 echo "The current working dir doesn't seem to be a git clone. Please cd there before running `basename $0`"