Dropped the trailing 's' for sleep to make it work on MacOS too

This commit is contained in:
Chris 2022-12-08 01:47:44 +01:00
parent 39baba327e
commit bd6b377498
No known key found for this signature in database
GPG Key ID: C235CFDB70198741
3 changed files with 7 additions and 7 deletions

View File

@ -23,7 +23,7 @@ function startServer()
{ {
"$server" "$tcp" --ignoreConfig -I $IMPORTS 2>stderr.txt > stdout.txt & "$server" "$tcp" --ignoreConfig -I $IMPORTS 2>stderr.txt > stdout.txt &
server_pid=$! server_pid=$!
sleep 1s; sleep 1
} }
# Make sure that the server is shut down # Make sure that the server is shut down
@ -33,7 +33,7 @@ echo "Shutting down currently-running server..."
for socket in unix tcp; do for socket in unix tcp; do
# allow some time for server to shutdown # allow some time for server to shutdown
sleep 0.5s; sleep 0.5;
if [[ $socket == "tcp" ]]; then if [[ $socket == "tcp" ]]; then
tcp="--tcp" tcp="--tcp"
@ -54,7 +54,7 @@ for socket in unix tcp; do
fi fi
sleepTime=$((1 << $i)) sleepTime=$((1 << $i))
echo "Server isn't up yet. Sleeping for ${sleepTime}s" echo "Server isn't up yet. Sleeping for ${sleepTime}s"
sleep "${sleepTime}s" sleep "${sleepTime}"
done done
# Run tests # Run tests

View File

@ -4,14 +4,14 @@ set -u
cp testfile1_old.d ../imports/testfile1.d cp testfile1_old.d ../imports/testfile1.d
# Sleep because modification times aren't stored with granularity of less # Sleep because modification times aren't stored with granularity of less
# than one second # than one second
sleep 1s; sleep 1
../../bin/dcd-client $1 file.d -c84 > actual1.txt ../../bin/dcd-client $1 file.d -c84 > actual1.txt
diff actual1.txt expected1.txt diff actual1.txt expected1.txt
cp testfile1_new.d ../imports/testfile1.d cp testfile1_new.d ../imports/testfile1.d
# Same here # Same here
sleep 1s; sleep 1
../../bin/dcd-client $1 file.d -c84 > actual2.txt ../../bin/dcd-client $1 file.d -c84 > actual2.txt
diff actual2.txt expected2.txt diff actual2.txt expected2.txt

View File

@ -4,14 +4,14 @@ set -u
cp testfile2_old.d ../imports/testfile2.d cp testfile2_old.d ../imports/testfile2.d
# Sleep because modification times aren't stored with granularity of less # Sleep because modification times aren't stored with granularity of less
# than one second # than one second
sleep 1s; sleep 1
../../bin/dcd-client $1 file.d -c39 > actual1.txt ../../bin/dcd-client $1 file.d -c39 > actual1.txt
diff actual1.txt expected1.txt diff actual1.txt expected1.txt
cp testfile2_new.d ../imports/testfile2.d cp testfile2_new.d ../imports/testfile2.d
# Same here # Same here
sleep 1s; sleep 1
../../bin/dcd-client $1 file.d -c39 > actual2.txt ../../bin/dcd-client $1 file.d -c39 > actual2.txt
diff actual2.txt expected2.txt diff actual2.txt expected2.txt