-
Notifications
You must be signed in to change notification settings - Fork 47
/
ost.sh
executable file
·67 lines (64 loc) · 1.33 KB
/
ost.sh
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/bash
help() {
echo "
$0 command [arguments]
run [-4|-6] [--ost-coverage] <suite> <distro> [<pytest args>...]
initializes the workspace with preinstalled distro ost-images, launches VMs and runs the whole suite
add extra repos with --custom-repo=url
skip check that extra repo is actually used with --skip-custom-repos-check
status
show environment status, VM details
shell <host> [command ...]
opens ssh connection
copy [<scp args>...] <source> <target>
runs scp
console <host>
opens virsh console
fetch-artifacts
fetches artifacts from all hosts
destroy
stop and remove the running environment
"
exit 0
}
[[ $# -eq 0 ]] && help
source lagofy.sh
cmd=$1; shift
case "$cmd" in
run)
[[ "$1" =~ ^-4$|^-6$ ]] && { ipv=$1; shift; }
[[ "$1" == "--ost-coverage" ]] && { ost_coverage_flag=$1; shift; }
suite=$1; shift
distro=$1; shift
ost_init $ipv $suite $distro || exit 1
ost_run_tests $ost_coverage_flag $@ || exit 1
;;
status)
ost_status
;;
destroy)
ost_destroy
;;
console)
host=$1; shift;
ost_console $host $@
;;
fetch-artifacts)
ost_fetch_artifacts
;;
copy)
ost_copy $@
;;
shell)
host=$1; shift;
ost_shell $host $@
;;
lock)
ost_lock $@
;;
*)
echo unknown command \"$cmd\"
help
;;
esac
exit 0