summaryrefslogtreecommitdiff
path: root/testprogs/blackbox
diff options
context:
space:
mode:
authorVolker Lendecke <vl@samba.org>2016-11-23 13:54:39 +0100
committerMichael Adam <obnox@samba.org>2016-11-24 00:42:54 +0100
commitb5fe9c685fcdf62fb1c42543933d12d018297b04 (patch)
treec84a30168d51f0e0bef605ae3efdd6cf151cbb04 /testprogs/blackbox
parent656f2a9dcd6822e1e8606a56bf4cd8984ce80f5d (diff)
downloadsamba-b5fe9c685fcdf62fb1c42543933d12d018297b04.tar.gz
selftest: Fix timestamps on FreeBSD 11
FreeBSD's date does not print the %, and \? does not catch that Tested this manually: $ echo 'time: 2016-11-23 12:52:19.123456Z'| sed 's/\..*NZ$/.000000Z/' time: 2016-11-23 12:52:19.123456Z $ echo 'time: 2016-11-23 12:52:19.%6NZ'| sed 's/\..*NZ$/.000000Z/' time: 2016-11-23 12:52:19.000000Z $ echo 'time: 2016-11-23 12:52:19.6NZ'| sed 's/\..*NZ$/.000000Z/' time: 2016-11-23 12:52:19.000000Z $ echo 'time: 2016-11-23 12:52:19.NZ'| sed 's/\..*NZ$/.000000Z/' time: 2016-11-23 12:52:19.000000Z $ Signed-off-by: Volker Lendecke <vl@samba.org> Reviewed-by: Michael Adam <obnox@samba.org> Autobuild-User(master): Michael Adam <obnox@samba.org> Autobuild-Date(master): Thu Nov 24 00:42:55 CET 2016 on sn-devel-144
Diffstat (limited to 'testprogs/blackbox')
-rwxr-xr-xtestprogs/blackbox/subunit.sh2
1 files changed, 1 insertions, 1 deletions
diff --git a/testprogs/blackbox/subunit.sh b/testprogs/blackbox/subunit.sh
index 70fe2d7e065..0791d775d27 100755
--- a/testprogs/blackbox/subunit.sh
+++ b/testprogs/blackbox/subunit.sh
@@ -22,7 +22,7 @@ timestamp() {
# mark the start time. With Gnu date, you get nanoseconds from %N
# (here truncated to microseconds with %6N), but not on BSDs,
# Solaris, etc, which will apparently leave either %N or N at the end.
- date -u +'time: %Y-%m-%d %H:%M:%S.%6NZ' | sed 's/%\?NZ$/000000Z/'
+ date -u +'time: %Y-%m-%d %H:%M:%S.%6NZ' | sed 's/\..*NZ$/.000000Z/'
}
subunit_start_test () {