summaryrefslogtreecommitdiffstats
path: root/test-directories.sh
diff options
context:
space:
mode:
authorClaudio Bandera <claudio.bandera@kit.edu>2015-08-30 23:04:16 +0200
committerClaudio Bandera <claudio.bandera@kit.edu>2015-08-30 23:04:16 +0200
commit2dbf0c220fc971c9493392a70c71954001fee7fd (patch)
treed846e08eb68b1aa69bb49d070d75cb4b7641b038 /test-directories.sh
parentda76c7dcbc9b52e881c864c7014dbf2a0aaf43b5 (diff)
downloadgit-sonar-2dbf0c220fc971c9493392a70c71954001fee7fd.tar.gz
git-sonar-2dbf0c220fc971c9493392a70c71954001fee7fd.zip
Fixed unittests for Ubuntu
Diffstat (limited to 'test-directories.sh')
-rwxr-xr-xtest-directories.sh4
1 files changed, 3 insertions, 1 deletions
diff --git a/test-directories.sh b/test-directories.sh
index 86a441e..83c408f 100755
--- a/test-directories.sh
+++ b/test-directories.sh
@@ -1,3 +1,4 @@
+#!/bin/bash
scriptDir="$(cd "$(dirname "$0")"; pwd)"
source "$scriptDir/radar-base.sh"
@@ -63,7 +64,8 @@ test_record_timestamp_in_repo() {
test_time_to_update_when_timestamp_is_old() {
cd $scriptDir
- touch -A "-010000" "$(dot_git)/lastupdatetime"
+ newtimestamp=$(date -d "now -1 hour" +%Y%m%d%H%M)
+ touch -t $newtimestamp "$(dot_git)/lastupdatetime"
assertTrue time_to_update
}