3 # Not really readed, and currently segfaulting on CI: # export XDEBUG_PORT= XDEBUG_MODE=off
5 ###############################################################################
8 ## Determine the absolute path of the directory with the file
9 ## usage: absdirname <file-path>
10 function absdirname
() {
11 pushd $
(dirname $0) >> /dev
/null
16 SCRIPT_DIR
=$
(absdirname
"$0")
17 EXT_DIR
=$
(cv path
-c extensionsDir
)
18 EX_EXT_DIR
="$EXT_DIR/example-mixin"
21 ## TODO: Once the managed-entity regression is examined/fixed, remove the MY_MIXINS list. Then it will test all mixins.
22 # MY_MIXINS='ang-php@1 case-xml@1 menu-xml@1 setting-php@1 theme-php@1'
25 ###############################################################################
27 ## usage: mixer_test <junit-test-file> [--bare] [--isolate] <mixin-names>...
28 function mixer_test
() {
32 [ -f "$JUNIT_DIR/$XML_FILE" ] && rm -f "$JUNIT_DIR/$XML_FILE"
37 ## Facilitate testing of mixin/case-xml@1.
38 cv ev
'CRM_Core_BAO_ConfigSetting::enableComponent("CiviCase");'
40 ## usage: mixer test [-f] [--bare] [--isolate] <temp-ext-path> [<mixin-names>...] -- [<phpunit-options>...]
41 "$SCRIPT_DIR/mixer" test -f "$EX_EXT_DIR" "$@" -- --group e2e
--log-junit "$JUNIT_DIR/$XML_FILE"
44 ###############################################################################
46 if [ -z "$EXT_DIR" -o ! -e "$EXT_DIR" ]; then
47 echo "Invalid extension dir: $EXT_DIR"
51 if [ -z "$JUNIT_DIR" ]; then
52 echo "Missing argument: <junit-dir>"
54 elif [ ! -d "$JUNIT_DIR" ]; then
60 mixer_test
"mixin-isolate-bare.xml" $MY_MIXINS --isolate --bare
61 mixer_test
"mixin-combine-bare.xml" $MY_MIXINS --bare
62 mixer_test
"mixin-combine-copy.xml" $MY_MIXINS