From 123181342355fb2d1fc11542b3f1724246414a3a Mon Sep 17 00:00:00 2001 From: Jean Privat Date: Sat, 13 Dec 2014 09:45:28 -0500 Subject: [PATCH] unitrun.sh: detect nonworking date command Signed-off-by: Jean Privat --- misc/jenkins/unitrun.sh | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/misc/jenkins/unitrun.sh b/misc/jenkins/unitrun.sh index 10dfd38..3bb1766 100755 --- a/misc/jenkins/unitrun.sh +++ b/misc/jenkins/unitrun.sh @@ -33,6 +33,13 @@ else TIME= fi +# Detect a working date command +if date -Iseconds >/dev/null 2>&1; then + TIMESTAMP="timestamp='`date -Iseconds`'" +else + TIMESTAMP= +fi + # Magic here! This tee and save both stdout and stderr in distinct files without messing with them # Time just get the user time $TIME "$@" > >(tee "${name}.out") 2> >(tee "${name}.2.out" >&2) @@ -43,7 +50,7 @@ n=${name##*-} cat > "${name}.xml"< - + END if test "$res" != "0"; then echo >> "${name}.xml" "" -- 1.7.9.5