diff options
Diffstat (limited to 'runsc')
-rw-r--r-- | runsc/BUILD | 2 | ||||
-rwxr-xr-x | runsc/version_test.sh | 10 |
2 files changed, 9 insertions, 3 deletions
diff --git a/runsc/BUILD b/runsc/BUILD index 44a325b6f..5e7dacb87 100644 --- a/runsc/BUILD +++ b/runsc/BUILD @@ -104,7 +104,7 @@ pkg_deb( sh_test( name = "version_test", - data = [":runsc"], size = "small", srcs = ["version_test.sh"], + data = [":runsc"], ) diff --git a/runsc/version_test.sh b/runsc/version_test.sh index 280815a46..cc0ca3f05 100755 --- a/runsc/version_test.sh +++ b/runsc/version_test.sh @@ -22,9 +22,15 @@ readonly version=$($runsc --version) # Version should should not match VERSION, which is the default and which will # also appear if something is wrong with workspace_status.sh script. if [[ $version =~ "VERSION" ]]; then - echo "Got bad version $version" + echo "FAIL: Got bad version $version" exit 1 fi -echo "Got OK version $version" +# Version should contain at least one number. +if [[ ! $version =~ [0-9] ]]; then + echo "FAIL: Got bad version $version" + exit 1 +fi + +echo "PASS: Got OK version $version" exit 0 |