Run package install test script "test-packages-$target.sh"
--debug
Output debug information (default: false)
+--only-test
+ Test only a specific package
WORKSPACE=path Path to the Arvados source tree to build packages from
fi
PARSEDOPTS=$(getopt --name "$0" --longoptions \
- help,debug,test-packages,target:,command: \
+ help,debug,test-packages,target:,command:,only-test: \
-- "" "$@")
if [ $? -ne 0 ]; then
exit 1
--target)
TARGET="$2"; shift
;;
+ --only-test)
+ packages="$2"; shift
+ ;;
--debug)
DEBUG=" --debug"
;;
time docker build --tag=$IMAGE .
popd
+if test -z "$packages" ; then
packages="arvados-api-server
arvados-data-manager
arvados-docker-cleaner
libarvados-perl
python27-python-arvados-fuse
python27-python-arvados-python-client"
+fi
FINAL_EXITCODE=0
+package_fails=""
+
if [[ -n "$test_packages" ]]; then
for p in $packages ; do
if ! docker run --rm -v "$JENKINS_DIR:/jenkins" -v "$WORKSPACE:/arvados" \
--env ARVADOS_DEBUG=1 "$IMAGE" $COMMAND $p ; then
FINAL_EXITCODE=$?
+ package_fails="$package_fails $p"
echo "ERROR: $tag build failed with exit status $FINAL_EXITCODE." >&2
fi
done
fi
fi
+if test -n "$package_fails" ; then
+ echo "Failed package tests:$package_fails"
+fi
+
exit $FINAL_EXITCODE
yum -q clean all
touch /var/lib/rpm/*
+rpm -qa | sort > /arvados/packages/centos6/$1.before
+
yum install --assumeyes $1
+rpm -qa | sort > /arvados/packages/centos6/$1.after
+
+set +e
+diff /arvados/packages/centos6/$1.before /arvados/packages/centos6/$1.after > /arvados/packages/centos6/$1.diff
+set -e
+
SCL=""
if scl enable python27 true 2>/dev/null ; then
SCL="scl enable python27"
mkdir -p /tmp/opts
cd /tmp/opts
-rpm2cpio /arvados/packages/centos6/$1-*.rpm | cpio -idm
+rpm2cpio /arvados/packages/centos6/$1-*.rpm | cpio -idm 2>/dev/null
shared=$(find -name '*.so')
if test -n "$shared" ; then
done
fi
-exec $SCL /jenkins/common-test-packages.sh $1
+if test -n "$SCL" ; then
+ exec $SCL "/jenkins/common-test-packages.sh $1"
+else
+ exec /jenkins/common-test-packages.sh $1
+fi