github.com/containers/podman/v5@v5.1.0-rc1/test/upgrade/helpers.bash (about) 1 # -*- bash -*- 2 3 load "../system/helpers" 4 load "../system/helpers.network" # For random_free_port() 5 6 setup() { 7 : 8 } 9 10 teardown() { 11 : 12 } 13 14 # skip a test when the given version is older than the currently tested one 15 skip_if_version_older() { 16 if version_is_older_than $1; then 17 skip "${2-test is only meaningful when upgrading from $1 or later}" 18 fi 19 } 20 21 version_is_older_than() { 22 # The '##v' strips off leading 'v' 23 printf '%s\n%s\n' "${PODMAN_UPGRADE_FROM##v}" "$1" | sort --check=quiet --version-sort 24 }