From d50d66731d03b63216ab261fba3c233b3dc9aee3 Mon Sep 17 00:00:00 2001 From: deajan Date: Thu, 17 Nov 2016 23:48:06 +0100 Subject: [PATCH] Added elapsed time to unit tests --- dev/tests/run_tests.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/dev/tests/run_tests.sh b/dev/tests/run_tests.sh index 396f1bc..095d36d 100755 --- a/dev/tests/run_tests.sh +++ b/dev/tests/run_tests.sh @@ -1,6 +1,6 @@ #!/usr/bin/env bash -# osync test suite 2016111703 +# osync test suite 2016111704 # 4 tests: # quicklocal @@ -162,6 +162,8 @@ function PrepareLocalDirs () { } function oneTimeSetUp () { + START_TIME=$SECONDS + source "$DEV_DIR/ofunctions.sh" SetupSSH @@ -181,6 +183,9 @@ function oneTimeTearDown () { #TODO: uncomment this when dev is done rm -rf "$OSYNC_TESTS_DIR" + + ELAPSED_TIME=$(($SECONDS - $START_TIME)) + echo "It took $ELAPSED_TIME seconds to run these tests." } function setUp () {