File tree 2 files changed +27
-10
lines changed
2 files changed +27
-10
lines changed Original file line number Diff line number Diff line change 20
20
options : --privileged
21
21
steps :
22
22
- uses : actions/checkout@v2
23
- - name : Run storage tests
23
+ - name : Run storage tests marked as root
24
+ run : ./automation/tests-storage.sh --root
25
+ - name : Run storage tests not marked as root
24
26
run : ./automation/tests-storage.sh
25
27
tests :
26
28
env :
Original file line number Diff line number Diff line change @@ -12,21 +12,31 @@ create_loop_devices() {
12
12
}
13
13
14
14
setup_storage () {
15
- python3 tests/ storage/userstorage.py setup
15
+ make storage
16
16
}
17
17
18
18
teardown_storage () {
19
- python3 tests/ storage/userstorage.py teardown \
19
+ make clean- storage \
20
20
|| echo " WARNING: Ingoring error while tearing down user storage"
21
21
}
22
22
23
- # Configure lvm to ignore udev events, otherwise some lvm tests hang.
24
- mkdir -p /etc/lvm
25
- cp docker/lvmlocal.conf /etc/lvm/
23
+ run_as_root=false
24
+ if [ ! -z " $1 " ]; then
25
+ flag=$1
26
+ if [ " $flag " = " --root" ]; then
27
+ run_as_root=true
28
+ fi
29
+ fi
26
30
27
- # Make sure we have enough loop device nodes. Using 16 devices since with 8
28
- # devices we have random mount failures.
29
- create_loop_devices 16
31
+ if [ run_as_root = true ]; then
32
+ # Configure lvm to ignore udev events, otherwise some lvm tests hang.
33
+ mkdir -p /etc/lvm
34
+ cp docker/lvmlocal.conf /etc/lvm/
35
+
36
+ # Make sure we have enough loop device nodes. Using 16 devices since with 8
37
+ # devices we have random mount failures.
38
+ create_loop_devices 16
39
+ fi
30
40
31
41
# Build vdsm.
32
42
./autogen.sh --system
36
46
trap teardown_storage EXIT
37
47
setup_storage
38
48
39
- make tests-storage
49
+ if [ run_as_root = true ]; then
50
+ # Run only tests marked as root
51
+ tox -e storage -- -m root --cov-fail-under=30 tests/storage
52
+ else
53
+ tox -e storage -- -m ' not root' tests/storage
54
+ fi
You can’t perform that action at this time.
0 commit comments