arvados-api-server-upgrade.sh fix: do not try to chmod the cache
[arvados-dev.git] / jenkins / deb-common-test-packages.sh
index f40ba7bf49eec0cdf3aa708873f1932c9be8451f..d9d0301647d63572b6233a2fb5480128a00ebdfe 100755 (executable)
@@ -1,29 +1,9 @@
-#!/bin/sh
+#!/bin/bash
 
-if test "$1" = --run-test ; then
+# Multiple .deb based distros symlink to this script, so extract the target
+# from the invocation path.
+target=$(echo $0 | sed 's/.*test-packages-\([^.]*\)\.sh.*/\1/')
 
-    if test -z "$WORKSPACE" ; then
-        echo "Must set WORKSPACE"
-        exit 1
-    fi
-
-    self=$(readlink -f $0)
-    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
-fi
-
-echo "deb file:///mnt /" >>/etc/apt/sources.list
 apt-get -qq update
 if ! apt-get -qq --assume-yes --force-yes install \
      python-arvados-python-client python-arvados-fuse arvados-node-manager
@@ -34,7 +14,7 @@ fi
 mkdir -p /tmp/opts
 cd /tmp/opts
 
-for r in /mnt/python-*amd64.deb ; do
+for r in /arvados/packages/$target/python-*amd64.deb ; do
     dpkg-deb -x $r .
 done
 
@@ -44,4 +24,4 @@ for so in $(find . -name "*.so") ; do
     ldd $so | awk '($3 ~ /^\//){print $3}' | sort -u | xargs dpkg -S | cut -d: -f1 | sort -u
 done
 
-exec /root/common-test.sh
+exec /jenkins/common-test-packages.sh