[ARVADOS-DEV] created: 8713e250470011db40d0cc9f1a02afbf98d2853c
git at public.curoverse.com
git at public.curoverse.com
Sat Aug 29 15:22:50 EDT 2015
at 8713e250470011db40d0cc9f1a02afbf98d2853c (commit)
commit 8713e250470011db40d0cc9f1a02afbf98d2853c
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Sat Aug 29 15:15:55 2015 -0400
Sets up local repositories for both centos (yum) and debian (apt), installs
from there as if an end user would.
diff --git a/jenkins/common-test-packages.sh b/jenkins/common-test-packages.sh
new file mode 100755
index 0000000..869f054
--- /dev/null
+++ b/jenkins/common-test-packages.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+
+FAIL=0
+
+for so in $(find . -name "*.so") ; do
+ if ldd $so | grep "not found" ; then
+ echo "^^^ Missing while scanning $so ^^^"
+ FAIL=1
+ fi
+done
+
+if ! python <<EOF
+import arvados
+import arvados_fuse
+print "Successly imported arvados and arvados_fuse"
+EOF
+then
+ FAIL=1
+fi
+
+exit $FAIL
diff --git a/jenkins/test-packages-deb-common.sh b/jenkins/deb-common-test-packages.sh
similarity index 57%
rename from jenkins/test-packages-deb-common.sh
rename to jenkins/deb-common-test-packages.sh
index d2c586c..fbebe24 100755
--- a/jenkins/test-packages-deb-common.sh
+++ b/jenkins/deb-common-test-packages.sh
@@ -8,13 +8,16 @@ if test "$1" = --run-test ; then
fi
self=$(readlink -f $0)
- cd $WORKSPACE/packages/debian7
+ base=$(dirname $self)
+
+ cd $WORKSPACE/packages/$2
dpkg-scanpackages . /dev/null | gzip -c9 > Packages.gz
exec docker run \
--rm \
--volume=$WORKSPACE/packages/$2:/mnt \
--volume=$self:/root/run-test.sh \
+ --volume=$base/common-test-packages.sh:/root/common-test.sh \
--workdir=/mnt \
$3 \
/root/run-test.sh
@@ -22,9 +25,15 @@ fi
echo "deb file:///mnt /" >>/etc/apt/sources.list
apt-get update
-apt-get --assume-yes --force-yes install python-arvados-python-client python-arvados-fuse
+if ! apt-get --assume-yes --force-yes install python-arvados-python-client python-arvados-fuse ; then
+ exit 1
+fi
+
+mkdir -p /tmp/opts
+cd /tmp/opts
+
+for r in /mnt/python-*amd64.deb ; do
+ dpkg-deb -x $r .
+done
-python <<EOF
-import arvados
-import arvados_fuse
-EOF
+exec /root/common-test.sh
diff --git a/jenkins/run-test-packages.sh b/jenkins/run-test-packages.sh
index c4f5bec..dce7362 100755
--- a/jenkins/run-test-packages.sh
+++ b/jenkins/run-test-packages.sh
@@ -5,6 +5,13 @@ if test -z "$WORKSPACE" ; then
exit 1
fi
-for pkg in test-packages-*.sh ; do
- $pkg --run-test
+FAIL=0
+
+for pkg in ./test-packages-*.sh ; do
+ if ! $pkg --run-test ; then
+ FAIL=1
+ echo "$pkg has install errors"
+ fi
done
+
+exit $FAIL
diff --git a/jenkins/test-packages-centos6.sh b/jenkins/test-packages-centos6.sh
index 6dd87e9..ea3ed09 100755
--- a/jenkins/test-packages-centos6.sh
+++ b/jenkins/test-packages-centos6.sh
@@ -7,10 +7,16 @@ if test "$1" = --run-test ; then
exit 1
fi
+ self=$(readlink -f $0)
+ base=$(dirname $self)
+
+ createrepo $WORKSPACE/packages/centos6
+
exec docker run \
--rm \
--volume=$WORKSPACE/packages/centos6:/mnt \
--volume=$(readlink -f $0):/root/run-test.sh \
+ --volume=$base/common-test-packages.sh:/root/common-test.sh \
--workdir=/mnt \
centos:6 \
/root/run-test.sh --install-scl
@@ -24,7 +30,19 @@ if test "$1" = --install-scl ; then
exec scl enable python27 $0
fi
-yum install --assumeyes python27-python*.rpm
+cat >/etc/yum.repos.d/localrepo.repo <<EOF
+[localrepo]
+name=Arvados Test
+baseurl=file:///mnt
+gpgcheck=0
+enabled=1
+EOF
+
+yum clean all
+yum update
+if ! yum install --assumeyes python27-python-arvados-python-client python27-python-arvados-fuse ; then
+ exit 1
+fi
mkdir -p /tmp/opts
cd /tmp/opts
@@ -33,18 +51,4 @@ for r in /mnt/python27-python-*x86_64.rpm ; do
rpm2cpio $r | cpio -idm
done
-FAIL=0
-
-for so in $(find . -name "*.so") ; do
- if ldd $so | grep "not found" ; then
- echo "^^^ Missing while scanning $so ^^^"
- FAIL=1
- fi
-done
-
-python <<EOF
-import arvados
-import arvados_fuse
-EOF
-
-exit $FAIL
+exec /root/common-test.sh
diff --git a/jenkins/test-packages-debian7.sh b/jenkins/test-packages-debian7.sh
index c48761c..c5cbfe6 100755
--- a/jenkins/test-packages-debian7.sh
+++ b/jenkins/test-packages-debian7.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-exec ./test-packages-deb-common.sh --run-test debian7 debian:wheezy
+exec ./deb-common-test-packages.sh --run-test debian7 debian:wheezy
diff --git a/jenkins/test-packages-debian8.sh b/jenkins/test-packages-debian8.sh
index 6e42806..5502f46 100755
--- a/jenkins/test-packages-debian8.sh
+++ b/jenkins/test-packages-debian8.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-exec ./test-packages-deb-common.sh --run-test debian8 debian:jessie
+exec ./deb-common-test-packages.sh --run-test debian8 debian:jessie
diff --git a/jenkins/test-packages-ubuntu1204.sh b/jenkins/test-packages-ubuntu1204.sh
index a8af4d8..00727a0 100755
--- a/jenkins/test-packages-ubuntu1204.sh
+++ b/jenkins/test-packages-ubuntu1204.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-exec ./test-packages-deb-common.sh --run-test ubuntu1204 ubuntu:precise
+exec ./deb-common-test-packages.sh --run-test ubuntu1204 ubuntu:precise
diff --git a/jenkins/test-packages-ubuntu1404.sh b/jenkins/test-packages-ubuntu1404.sh
index a70a1f6..bfc2c85 100755
--- a/jenkins/test-packages-ubuntu1404.sh
+++ b/jenkins/test-packages-ubuntu1404.sh
@@ -1,3 +1,3 @@
#!/bin/sh
-exec ./test-packages-deb-common.sh --run-test ubuntu1404 ubuntu:trusty
+exec ./deb-common-test-packages.sh --run-test ubuntu1404 ubuntu:trusty
commit 77f198433d31d492d86c38359940acd7f5012cf8
Author: Peter Amstutz <peter.amstutz at curoverse.com>
Date: Fri Aug 28 17:18:20 2015 -0400
Script to automatically test python package installation on clean Docker
images.
diff --git a/jenkins/run-test-packages.sh b/jenkins/run-test-packages.sh
new file mode 100755
index 0000000..c4f5bec
--- /dev/null
+++ b/jenkins/run-test-packages.sh
@@ -0,0 +1,10 @@
+#!/bin/sh
+
+if test -z "$WORKSPACE" ; then
+ echo "Must set WORKSPACE"
+ exit 1
+fi
+
+for pkg in test-packages-*.sh ; do
+ $pkg --run-test
+done
diff --git a/jenkins/test-packages-centos6.sh b/jenkins/test-packages-centos6.sh
new file mode 100755
index 0000000..6dd87e9
--- /dev/null
+++ b/jenkins/test-packages-centos6.sh
@@ -0,0 +1,50 @@
+#!/bin/sh
+
+if test "$1" = --run-test ; then
+
+ if test -z "$WORKSPACE" ; then
+ echo "Must set WORKSPACE"
+ exit 1
+ fi
+
+ exec docker run \
+ --rm \
+ --volume=$WORKSPACE/packages/centos6:/mnt \
+ --volume=$(readlink -f $0):/root/run-test.sh \
+ --workdir=/mnt \
+ centos:6 \
+ /root/run-test.sh --install-scl
+fi
+
+if test "$1" = --install-scl ; then
+ yum install --assumeyes scl-utils
+ curl -L -O https://www.softwarecollections.org/en/scls/rhscl/python27/epel-6-x86_64/download/rhscl-python27-epel-6-x86_64.noarch.rpm
+ yum install --assumeyes rhscl-python27-epel-6-x86_64.noarch.rpm
+ yum install --assumeyes python27
+ exec scl enable python27 $0
+fi
+
+yum install --assumeyes python27-python*.rpm
+
+mkdir -p /tmp/opts
+cd /tmp/opts
+
+for r in /mnt/python27-python-*x86_64.rpm ; do
+ rpm2cpio $r | cpio -idm
+done
+
+FAIL=0
+
+for so in $(find . -name "*.so") ; do
+ if ldd $so | grep "not found" ; then
+ echo "^^^ Missing while scanning $so ^^^"
+ FAIL=1
+ fi
+done
+
+python <<EOF
+import arvados
+import arvados_fuse
+EOF
+
+exit $FAIL
diff --git a/jenkins/test-packages-deb-common.sh b/jenkins/test-packages-deb-common.sh
new file mode 100755
index 0000000..d2c586c
--- /dev/null
+++ b/jenkins/test-packages-deb-common.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+if test "$1" = --run-test ; then
+
+ if test -z "$WORKSPACE" ; then
+ echo "Must set WORKSPACE"
+ exit 1
+ fi
+
+ self=$(readlink -f $0)
+ cd $WORKSPACE/packages/debian7
+ dpkg-scanpackages . /dev/null | gzip -c9 > Packages.gz
+
+ exec docker run \
+ --rm \
+ --volume=$WORKSPACE/packages/$2:/mnt \
+ --volume=$self:/root/run-test.sh \
+ --workdir=/mnt \
+ $3 \
+ /root/run-test.sh
+fi
+
+echo "deb file:///mnt /" >>/etc/apt/sources.list
+apt-get update
+apt-get --assume-yes --force-yes install python-arvados-python-client python-arvados-fuse
+
+python <<EOF
+import arvados
+import arvados_fuse
+EOF
diff --git a/jenkins/test-packages-debian7.sh b/jenkins/test-packages-debian7.sh
new file mode 100755
index 0000000..c48761c
--- /dev/null
+++ b/jenkins/test-packages-debian7.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-packages-deb-common.sh --run-test debian7 debian:wheezy
diff --git a/jenkins/test-packages-debian8.sh b/jenkins/test-packages-debian8.sh
new file mode 100755
index 0000000..6e42806
--- /dev/null
+++ b/jenkins/test-packages-debian8.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-packages-deb-common.sh --run-test debian8 debian:jessie
diff --git a/jenkins/test-packages-ubuntu1204.sh b/jenkins/test-packages-ubuntu1204.sh
new file mode 100755
index 0000000..a8af4d8
--- /dev/null
+++ b/jenkins/test-packages-ubuntu1204.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-packages-deb-common.sh --run-test ubuntu1204 ubuntu:precise
diff --git a/jenkins/test-packages-ubuntu1404.sh b/jenkins/test-packages-ubuntu1404.sh
new file mode 100755
index 0000000..a70a1f6
--- /dev/null
+++ b/jenkins/test-packages-ubuntu1404.sh
@@ -0,0 +1,3 @@
+#!/bin/sh
+
+exec ./test-packages-deb-common.sh --run-test ubuntu1404 ubuntu:trusty
-----------------------------------------------------------------------
hooks/post-receive
--
More information about the arvados-commits
mailing list