From: Jean Privat Date: Sat, 13 Dec 2014 14:45:28 +0000 (-0500) Subject: unitrun.sh: detect nonworking date command X-Git-Tag: v0.7~38^2~1 X-Git-Url: http://nitlanguage.org unitrun.sh: detect nonworking date command Signed-off-by: Jean Privat --- 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" ""