<NME> ubuntu_test.sh
<BEF> 
export CVMFS_PLATFORM_NAME="ubuntu$(. /etc/os-release && echo "$VERSION_ID")-$(uname -m)"
export CVMFS_TIMESTAMP=$(date -u +'%Y-%m-%dT%H:%M:%SZ')

# source the common platform independent functionality and option parsing
script_location=$(cd "$(dirname "$0")"; pwd)
. ${script_location}/common_test.sh

retval=0

echo "running unittests"
run_unittests --gtest_shuffle \
             --gtest_death_test_use_fork || retval=1


CVMFS_EXCLUDE=

ubuntu_release="$(lsb_release -cs)"
if [ "x$ubuntu_release" == "xxenial" ]; then
  # This test has shown to occasionally hang in the GDB attach on Ubuntu 16
  CVMFS_EXCLUDE="$CVMFS_EXCLUDE 015-rebuild_on_crash"
  # Killing the sudo process group in 095 is buggy on Ubuntu 16
  CVMFS_EXCLUDE="$CVMFS_EXCLUDE 095-fuser"
fi

# Kernel sources too old for gcc, TODO
if [ x"$(lsb_release -cs)" = x"trusty" ]; then
  # Ubuntu 14.04
  # aufs, expected failure
  CVMFS_EXCLUDE="src/700-overlayfs_validation src/800-repository_services"

  echo "Ubuntu 14.04... using aufs instead of overlayfs"
fi
if [ x"$(lsb_release -cs)" = x"precise" ]; then
  # Ubuntu 12.04
  # aufs, expected failure
  CVMFS_EXCLUDE="src/614-geoservice src/700-overlayfs_validation src/800-repository_services"

  echo "Ubuntu 12.04... using aufs instead of overlayfs"
fi
  CVMFS_EXCLUDE="$CVMFS_EXCLUDE src/682-enter src/811-commit-gateway"
fi

export CVMFS_TEST_UNIONFS=overlayfs

cd ${SOURCE_DIRECTORY}/test
echo "running CernVM-FS client test cases..."
CVMFS_TEST_CLASS_NAME=ClientIntegrationTests                                  \
./run.sh $CLIENT_TEST_LOGFILE -o ${CLIENT_TEST_LOGFILE}${XUNIT_OUTPUT_SUFFIX} \
                              -x src/004-davinci                              \
                                 src/005-asetup                               \
                                 src/007-testjobs                             \
                                 src/024-reload-during-asetup                 \
                                 src/084-premounted                           \
                                 src/094-attachmount                          \
                                 $CVMFS_EXCLUDE                               \
                                 --                                           \
                                 src/0*                                       \
                              || retval=1


if [ x"$(uname -m)" = x"x86_64" ]; then
  echo "running CernVM-FS server test cases..."
  CVMFS_TEST_CLASS_NAME=ServerIntegrationTests                                  \
  ./run.sh $SERVER_TEST_LOGFILE -o ${SERVER_TEST_LOGFILE}${XUNIT_OUTPUT_SUFFIX} \
                                -x src/518-hardlinkstresstest                   \
                                   src/600-securecvmfs                          \
                                   src/647-bearercvmfs                          \
                                   src/673-acl                                  \
                                   src/684-https_s3                             \
                                   src/686-azureblob_s3                         \
                                   src/687-import_s3                            \
                                   $CVMFS_EXCLUDE                               \
                                   --                                           \
                                   src/5*                                       \
                                   src/6*                                       \
                                   src/7*                                       \
                                   src/8*                                       \
                                   src/9*                                       \
                                || retval=1
fi


echo "running CernVM-FS client migration test cases..."
CVMFS_TEST_CLASS_NAME=ClientMigrationTests                        \
./run.sh $MIGRATIONTEST_CLIENT_LOGFILE                            \
         -o ${MIGRATIONTEST_CLIENT_LOGFILE}${XUNIT_OUTPUT_SUFFIX} \
            migration_tests/0*                                    \
          || retval=1

if [ x"$(uname -m)" = x"x86_64" ]; then
  echo "running CernVM-FS server migration test cases..."
  CVMFS_TEST_CLASS_NAME=ServerMigrationTests                       \
  ./run.sh $MIGRATIONTEST_SERVER_LOGFILE                           \
          -o ${MIGRATIONTEST_SERVER_LOGFILE}${XUNIT_OUTPUT_SUFFIX} \
              migration_tests/5*                                   \
          || retval=1
fi

exit $retval

<MSG> Fixing exclusion of repo gateway tests on Ubuntu 14.04 and 12.04

<DFF> @@ -27,14 +27,14 @@ fi
 if [ x"$(lsb_release -cs)" = x"trusty" ]; then
   # Ubuntu 14.04
   # aufs, expected failure
-  CVMFS_EXCLUDE="src/700-overlayfs_validation src/800-repository_services"
+  CVMFS_EXCLUDE="src/700-overlayfs_validation src/80*-repository_gateway"
 
   echo "Ubuntu 14.04... using aufs instead of overlayfs"
 fi
 if [ x"$(lsb_release -cs)" = x"precise" ]; then
   # Ubuntu 12.04
   # aufs, expected failure
-  CVMFS_EXCLUDE="src/614-geoservice src/700-overlayfs_validation src/800-repository_services"
+  CVMFS_EXCLUDE="src/614-geoservice src/700-overlayfs_validation src/80*-repository_gateway"
 
   echo "Ubuntu 12.04... using aufs instead of overlayfs"
 fi

{'addition_count': 2, 'commit_subject': 'Fixing exclusion of repo gateway tests on Ubuntu 14.04 and 12.04', 'deletion_count': 2, 'file_extension': '.sh', 'lang': 'sh', 'license': 'bsd-3-clause', 'repo_name': 'cvmfs/cvmfs'}