Commit 0b36b0f cri-o tests

2 files Authored and Committed by santiago 10 months ago
cri-o tests

    
 1 @@ -3,11 +3,19 @@
 2   # Simple wrapper for cri-o tests
 3   #
 4   
 5 - set -e -x
 6 + set -x
 7   
 8   exec >/tmp/test.debug.log 2>&1
 9   
10 - rm -f /tmp/test.log
11 + echo "************************************************************************"
12 + echo "* This log contains the output from test_crio.sh."
13 + echo "*"
14 + echo "* It is almost certainly not what you want. What you want is"
15 + echo "* probably test.full.log , which is the output of test_runner.sh ,"
16 + echo "* the actual cri-o tests."
17 + echo "************************************************************************"
18 + 
19 + rm -f /tmp/test.log /tmp/test.full.log
20   
21   cd /usr/share/cri-o/test
22   
23 @@ -16,18 +24,30 @@
24       /etc/containers/registries.d/registry.access.redhat.com.yaml
25   
26   export CRIO_CNI_PLUGIN=/usr/libexec/cni
27 - export OCIC_BINARY=/usr/bin/crioctl
28   export PAUSE_BINARY=/usr/libexec/crio/pause
29   export CRIO_BINARY=/usr/bin/crio
30 - export KPOD_BINARY=/usr/bin/kpod
31   export CONMON_BINARY=/usr/libexec/crio/conmon
32   export SECCOMP_PROFILE=/etc/crio/seccomp.json
33   
34 - ./test_runner.sh
35 + ./test_runner.sh &> /tmp/test.full.log
36   
37 - # FIXME: exit status?
38 - # FIXME: filter into /tmp/test.log
39 + status=$?
40   
41 - touch /tmp/test.log
42 + # Sample output from cri-tests:
43 + #
44 + #   not ok 35 ctr update resources
45 + #   ok 84 pod stop idempotent with ctrs already stopped
46 + #   ok 86 # skip (need systemd cgroup manager) invalid systemd cgroup_parent
47 + #
48 + # convert those to:
49 + #
50 + #   FAIL 35 ctr ...
51 + #   PASS 84 pod stop ...
52 + #
53 + sed -n                            \
54 +     -e 's/^ok /PASS /p'           \
55 +     -e 's/^not ok /FAIL /p'       \
56 +     </tmp/test.full.log           \
57 +     >/tmp/test.log
58   
59 - exit 0
60 + exit $status
 1 @@ -2,7 +2,6 @@
 2   - hosts: localhost
 3     vars:
 4     - artifacts: ./artifacts
 5 -     excluded_tests: ""
 6     tags:
 7       - classic
 8       - container
 9 @@ -10,7 +9,7 @@
10   
11     tasks:
12     - name: install integration tests
13 -     dnf: name={{ item }} state=present
14 +     dnf: name={{ item }} state=present enablerepo=updates-testing
15       with_items:
16         - cri-o
17         - cri-o-integration-tests
18 @@ -18,6 +17,8 @@
19         - nmap-ncat
20         - socat
21         - containernetworking-cni
22 +       - conntrack-tools
23 +       - python2
24         - bats
25   
26     - block:
27 @@ -26,11 +27,10 @@
28       always:
29         - name: Pull out logs
30           fetch:
31 -           src: "/tmp/{{ item.remote_path }}"
32 -           dest: "{{ artifacts }}/{{ item.localname }}"
33 +           src: "/tmp/{{ item }}"
34 +           dest: "{{ artifacts }}/{{ item }}"
35             flat: yes
36           with_items:
37 -           - remote_path: test.log
38 -             localname: test.log
39 -           - remote_path: test.debug.log
40 -             localname: test.debug.log
41 +           - test.log
42 +           - test.debug.log
43 +           - test.full.log