diff options
author | Paul Holzinger <paul.holzinger@web.de> | 2020-08-18 19:37:05 +0200 |
---|---|---|
committer | Matthew Heon <matthew.heon@pm.me> | 2020-08-20 12:24:16 -0400 |
commit | d3ef4770d4e33f3f6c12895b726320b9c9f311c2 (patch) | |
tree | 0a8625e0e722cd67ad6a6f5f7fda2c27ae8cee43 | |
parent | b5b782f2584e59534ae1d66551de0e04fc3c0038 (diff) | |
download | podman-d3ef4770d4e33f3f6c12895b726320b9c9f311c2.tar.gz podman-d3ef4770d4e33f3f6c12895b726320b9c9f311c2.tar.bz2 podman-d3ef4770d4e33f3f6c12895b726320b9c9f311c2.zip |
fix podman version output to include git commit and builttime
Add the go module version v2 to the libpod path.
Signed-off-by: Paul Holzinger <paul.holzinger@web.de>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | test/system/001-basic.bats | 7 |
2 files changed, 8 insertions, 1 deletions
@@ -66,7 +66,7 @@ else BUILD_INFO ?= $(shell date "+$(DATE_FMT)") ISODATE ?= $(shell date --iso-8601) endif -LIBPOD := ${PROJECT}/libpod +LIBPOD := ${PROJECT}/v2/libpod GCFLAGS ?= all=-trimpath=${PWD} ASMFLAGS ?= all=-trimpath=${PWD} LDFLAGS_PODMAN ?= \ diff --git a/test/system/001-basic.bats b/test/system/001-basic.bats index 71595f419..b12836b9e 100644 --- a/test/system/001-basic.bats +++ b/test/system/001-basic.bats @@ -24,6 +24,13 @@ function setup() { is "${lines[0]}" "Version:[ ]\+[1-9][0-9.]\+" "Version line 1" is "$output" ".*Go Version: \+" "'Go Version' in output" is "$output" ".*API Version: \+" "API version in output" + + # Test that build date is reasonable, e.g. after 2019-01-01 + local built=$(expr "$output" : ".*Built: \+\(.*\)" | head -n1) + local built_t=$(date --date="$built" +%s) + if [ $built_t -lt 1546300800 ]; then + die "Preposterous 'Built' time in podman version: '$built'" + fi } |