#!/bin/bash set -e export XDEBUG_PORT= XDEBUG_MODE=off ############################################################################### ## Bootstrap ## Determine the absolute path of the directory with the file ## usage: absdirname function absdirname() { pushd $(dirname $0) >> /dev/null pwd popd >> /dev/null } SCRIPT_DIR=$(absdirname "$0") EXT_DIR=$(cv path -c extensionsDir)/example-mixin JUNIT_DIR="$1" ## TODO: Once the managed-entity regression is examined/fixed, remove the MY_MIXINS list. Then it will test all mixins. # MY_MIXINS='ang-php@1 case-xml@1 menu-xml@1 setting-php@1 theme-php@1' MY_MIXINS='' ############################################################################### ## usage: mixer_test [--bare] [--isolate] ... function mixer_test() { local XML_FILE="$1" shift [ -f "$JUNIT_DIR/$XML_FILE" ] && rm -f "$JUNIT_DIR/$XML_FILE" civibuild restore cv flush ## usage: mixer test [-f] [--bare] [--isolate] [...] -- [...] "$SCRIPT_DIR/mixer" test -f "$EXT_DIR" "$@" -- --group e2e --log-junit "$JUNIT_DIR/$XML_FILE" } ############################################################################### if [ -z "$EXT_DIR" -o ! -e "$EXT_DIR" ]; then echo "Invalid extension dir: $EXT_DIR" exit 1 fi if [ -z "$JUNIT_DIR" ]; then echo "Missing argument: " exit 1 elif [ ! -d "$JUNIT_DIR" ]; then mkdir -p "$JUNIT_DIR" fi set -ex mixer_test "mixin-isolate-bare.xml" $MY_MIXINS --isolate --bare mixer_test "mixin-combine-bare.xml" $MY_MIXINS --bare mixer_test "mixin-combine-copy.xml" $MY_MIXINS