File: test-vagrant

package info (click to toggle)
kpatch 0.9.10-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 4,716 kB
  • sloc: ansic: 9,716; sh: 2,592; makefile: 260; asm: 35
file content (42 lines) | stat: -rwxr-xr-x 806 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
#!/bin/bash

SCRIPTDIR=$(readlink -f "$(dirname "$(type -p "${0}")")")
ROOTDIR=$(readlink -f "${SCRIPTDIR}/../..")
SLOWTEST=0

# shellcheck disable=SC1090
source "${ROOTDIR}/test/integration/lib.sh"

usage()
{
	echo "usage: $(basename "${0}") [options]" >&2
	echo "-h, --help This message" >&2
	echo "-s, --slow Run all of the tests" >&2
}

options="$(getopt -o hs -l "help,slow" -- "$@")" || "getopt failed"

eval set -- "${options}"

while [[ $# -gt 0 ]]; do
	case "$1" in
		-s|--slow)
			SLOWTEST=1
			;;
		-h|--help)
			usage
			exit 0
		;;
	esac
	shift
done

declare -a distros=("fedora27" "centos7")

ret=0
for distro in "${distros[@]}"; do
	kpatch_integration_tests_vagrant_distro "${distro}" "${ROOTDIR}/test/integration/vm-integration-run" "${SLOWTEST}"
	rc=$?
	ret=$((ret + rc))
done
exit ${ret}