asynciodebian/masterdebian/stretch-backportsjessie-backportsproxy-ticketupstream
Last change
on this file since 412ee84 was
412ee84,
checked in by Thomas Klute <thomas2.klute@…>, 7 years ago
|
Test suite: Allow the user to disable use of "flock"
Using "flock" causes trouble on some exotic architectures (e.g. Hurd),
so allow disabling it. Running without lock files requires serial
execution of test cases to achieve reliable results.
|
-
Property mode set to
100644
|
File size:
323 bytes
|
Line | |
---|
1 | #!/bin/bash |
---|
2 | |
---|
3 | # Usage: wait_pid_gone ${FILE} |
---|
4 | # |
---|
5 | # Wait until $FILE disappears, but no longer than $TEST_LOCK_WAIT |
---|
6 | # seconds |
---|
7 | function wait_pid_gone |
---|
8 | { |
---|
9 | local pid_file="${1}" |
---|
10 | local pid_wait=0 |
---|
11 | while [ -e "${pid_file}" ]; do |
---|
12 | if [ "$((pid_wait++))" -gt "${TEST_LOCK_WAIT}" ]; then |
---|
13 | return 1 |
---|
14 | fi |
---|
15 | sleep 1 |
---|
16 | done |
---|
17 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.