<commit_before>#!/bin/bash

portable_dirname() {
  if [ "x$(uname -s)" = "xDarwin" ]; then
    echo $(dirname $(/usr/local/bin/greadlink --canonicalize $1))
  else
    echo $(dirname $(readlink --canonicalize $1))
  fi
}

script_location=$(portable_dirname $0)
. ${script_location}/common.sh

#
# Common functionality for cloud platform test execution engine (test setup)
# After sourcing this file the following variables are set:
#
#  SERVER_PACKAGE        location of the CernVM-FS server package to install
#  CLIENT_PACKAGE        location of the CernVM-FS client package to install
#  FUSE3_PACKAGE         location of the libcvmfs_fuse3 package
#  DEVEL_PACKAGE         location of the CernVM-FS devel package to install
#  CONFIG_PACKAGES       location of the CernVM-FS config packages
#  SOURCE_DIRECTORY      location of the CernVM-FS sources forming above packages
#  UNITTEST_PACKAGE      location of the CernVM-FS unit test package
#  SHRINKWRAP_PACKAGE    location of the CernVM-FS shrinkwrap package
#  LOG_DIRECTORY         location of the test log files to be created
#  GATEWAY_BUILD_URL     location of the repository gateway build to install
#

SERVER_PACKAGE=""
CLIENT_PACKAGE=""
FUSE3_PACKAGE=""
DEVEL_PACKAGE=""
UNITTEST_PACKAGE=""
SHRINKWRAP_PACKAGE=""
CONFIG_PACKAGES=""
SOURCE_DIRECTORY=""
LOG_DIRECTORY=""
GATEWAY_BUILD_URL=""

# parse script parameters (same for all platforms)
while getopts "s:c:d:k:t:g:l:w:n:p:f:" option; do
  case $option in
    s)
      SERVER_PACKAGE=$OPTARG
      ;;
    c)
      CLIENT_PACKAGE=$OPTARG
      ;;
    f)
      FUSE3_PACKAGE=$OPTARG
      ;;
    d)
      DEVEL_PACKAGE=$OPTARG
      ;;
    k)
      CONFIG_PACKAGES="$OPTARG"
      ;;
    t)
      SOURCE_DIRECTORY=$OPTARG
      ;;
    g)
      UNITTEST_PACKAGE=$OPTARG<commit_msg>Add missing usage() to common_setup.sh in cloudtesting<commit_after>#!/bin/bash

portable_dirname() {
  if [ "x$(uname -s)" = "xDarwin" ]; then
    echo $(dirname $(/usr/local/bin/greadlink --canonicalize $1))
  else
    echo $(dirname $(readlink --canonicalize $1))
  fi
}

script_location=$(portable_dirname $0)
. ${script_location}/common.sh

#
# Common functionality for cloud platform test execution engine (test setup)
# After sourcing this file the following variables are set:
#
#  SERVER_PACKAGE        location of the CernVM-FS server package to install
#  CLIENT_PACKAGE        location of the CernVM-FS client package to install
#  FUSE3_PACKAGE         location of the libcvmfs_fuse3 package
#  DEVEL_PACKAGE         location of the CernVM-FS devel package to install
#  CONFIG_PACKAGES       location of the CernVM-FS config packages
#  SOURCE_DIRECTORY      location of the CernVM-FS sources forming above packages
#  UNITTEST_PACKAGE      location of the CernVM-FS unit test package
#  SHRINKWRAP_PACKAGE    location of the CernVM-FS shrinkwrap package
#  LOG_DIRECTORY         location of the test log files to be created
#  GATEWAY_BUILD_URL     location of the repository gateway build to install
#

SERVER_PACKAGE=""
CLIENT_PACKAGE=""
FUSE3_PACKAGE=""
DEVEL_PACKAGE=""
UNITTEST_PACKAGE=""
SHRINKWRAP_PACKAGE=""
CONFIG_PACKAGES=""
SOURCE_DIRECTORY=""
LOG_DIRECTORY=""
GATEWAY_BUILD_URL=""

usage() {
  local msg=$1

  echo "$msg"
  echo
  echo "Mandatory options:"
  echo " -t <cvmfs source tree>      CernVM-FS source tree location"
  echo " -s <cvmfs server package>   CernVM-FS server package to be tested"
  echo " -c <cvmfs client package>   CernVM-FS client package to be tested"
  echo " -f <cvmfs fuse3 package>    CernVM-FS fuse3 package to be tested"
  echo " -l <test log directory>     destination for log file generation"
  echo " -d <cvmfs devel package>    CernVM-FS devel package to be tested"
  echo " -k <cvmfs config packages>  CernVM-FS config packages to be tested"
  echo " -g <cvmfs unittest package> CernVM-FS unittest package to be tested"
  echo " -p <shrinkwrap package>     CernVM-FS shrinkwrap package to be tested"
  echo " -w <gateway build url>      URL of gateway build to be tested"

  exit 1
}

# parse script parameters (same for all platforms)
while getopts "s:c:d:k:t:g:l:w:n:p:f:" option; do
  case $option in
    s)
      SERVER_PACKAGE=$OPTARG
      ;;
    c)
      CLIENT_PACKAGE=$OPTARG
      ;;
    f)
      FUSE3_PACKAGE=$OPTARG
      ;;
    d)
      DEVEL_PACKAGE=$OPTARG
      ;;
    k)
      CONFIG_PACKAGES="$OPTARG"
      ;;
    t)
      SOURCE_DIRECTORY=$OPTARG
      ;;
    g)
      UNITTEST_PACKAGE=$OPTARG
{'fraction_non_alphanumeric': 0.08960893854748603, 'fraction_numerical': 0.004022346368715084, 'mean_word_length': 3.3204633204633205, 'pattern_counts': {'":': 0, '<': 13, '<?xml version=': 0, '>': 13, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3391086', 'n_tokens_mistral': 1502, 'n_tokens_neox': 1451, 'n_words': 449}