diff options
author | Artur Signell <artur@vaadin.com> | 2012-08-30 17:24:36 +0300 |
---|---|---|
committer | Artur Signell <artur@vaadin.com> | 2012-08-30 17:24:36 +0300 |
commit | 7b25b3886ea95bc6495506fbe9472e45fcbde684 (patch) | |
tree | 0b93cb65dab437feb46720659a63b8f1ef48f7f4 /uitest/integration_base_files/lock_age.sh | |
parent | 8941056349e302e687e40e94c13709e75f256d73 (diff) | |
download | vaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.tar.gz vaadin-framework-7b25b3886ea95bc6495506fbe9472e45fcbde684.zip |
Renamed tests -> uitest and tests/testbench -> uitest/src (#9299)
Diffstat (limited to 'uitest/integration_base_files/lock_age.sh')
-rw-r--r-- | uitest/integration_base_files/lock_age.sh | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/uitest/integration_base_files/lock_age.sh b/uitest/integration_base_files/lock_age.sh new file mode 100644 index 0000000000..115a8fef79 --- /dev/null +++ b/uitest/integration_base_files/lock_age.sh @@ -0,0 +1,21 @@ +#! /bin/bash +if lockfile -r0 -! /home/integration/deploy/lock.file &> /dev/null + then + # If we could not get the lock, check how old the lock file is + DATE=$(date +%s) + # What if the file is not there any more? + LOCK_AGE=$(stat -c %Z /home/integration/deploy/lock.file) + + AGE=$[($DATE - $LOCK_AGE)/60] + + if [ "$AGE" -gt "20" ] + then + echo lock.file is $AGE min old. + ./cleanup.sh +# else +# echo lock.file is $AGE min old. + fi + else + # If we got the lock, do a cleanup (releasing the lock) just in case something has still been left running + ./cleanup.sh &> /dev/null +fi |