8080: Successfully tests all packages. Produces before/after/diff lists for each...
[arvados-dev.git] / jenkins / test-packages-centos6.sh
1 #!/bin/bash
2
3 set -eu
4
5 yum -q clean all
6 touch /var/lib/rpm/*
7
8 rpm -qa | sort > /arvados/packages/centos6/$1.before
9
10 yum install --assumeyes $1
11
12 rpm -qa | sort > /arvados/packages/centos6/$1.after
13
14 set +e
15 diff /arvados/packages/centos6/$1.before /arvados/packages/centos6/$1.after > /arvados/packages/centos6/$1.diff
16 set -e
17
18 SCL=""
19 if scl enable python27 true 2>/dev/null ; then
20     SCL="scl enable python27"
21 fi
22
23 mkdir -p /tmp/opts
24 cd /tmp/opts
25
26 rpm2cpio /arvados/packages/centos6/$1-*.rpm | cpio -idm 2>/dev/null
27
28 shared=$(find -name '*.so')
29 if test -n "$shared" ; then
30     for so in $shared ; do
31         echo
32         echo "== Packages dependencies for $so =="
33         $SCL ldd "$so" \
34             | awk '($3 ~ /^\//){print $3}' | sort -u | xargs rpm -qf | sort -u
35     done
36 fi
37
38 if test -n "$SCL" ; then
39     exec $SCL "/jenkins/common-test-packages.sh $1"
40 else
41     exec /jenkins/common-test-packages.sh $1
42 fi