diff --git a/app/config/drupal-clean/download.sh b/app/config/drupal-clean/download.sh index 9dbc596b..e485d12e 100644 --- a/app/config/drupal-clean/download.sh +++ b/app/config/drupal-clean/download.sh @@ -21,6 +21,9 @@ pushd "$WEB_ROOT/web" extract-url --cache-ttl 172800 civicrm=http://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz ## or https://raw.github.com/civicrm/l10n/master/po/fr_CA/civicrm.mo => civicrm/l10n/fr_CA/LC_MESSAGES/ + pushd civicrm + composer install + popd popd popd diff --git a/app/config/drupal-clean/install.sh b/app/config/drupal-clean/install.sh index 5fe6e37b..0e9a4d21 100644 --- a/app/config/drupal-clean/install.sh +++ b/app/config/drupal-clean/install.sh @@ -34,10 +34,17 @@ if [[ "$CIVI_VERSION" =~ ^4.[0123456](\.([0-9]|alpha|beta)+)?$ ]] ; then CIVI_EXT_URL="${CMS_URL}/sites/${DRUPAL_SITE_DIR}/ext" fi -civicrm_install +# If you've switched branches and triggered `reinstall`, then you need to refresh composer deps/autoloader before installing +(cd "$CIVI_CORE" && composer install) + +civicrm_install_cv + +## Generating `civicrm.config.php` is necessary for `extern/*.php` and its E2E tests +(cd "$CIVI_CORE" && ./bin/setup.sh -g) ############################################################################### ## Extra configuration + pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null drush -y updatedb @@ -48,6 +55,9 @@ pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null cv ev 'if(is_callable(array("CRM_Core_BAO_CMSUser","synchronize"))){CRM_Core_BAO_CMSUser::synchronize(FALSE);}else{CRM_Utils_System::synchronizeUsers();}' + ## Setup CiviCRM + cv vset '{"enable_components":["CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge","CiviCase","CiviCampaign"]}' + ## Setup theme #above# drush -y en garland export SITE_CONFIG_DIR diff --git a/app/config/drupal-demo/download.sh b/app/config/drupal-demo/download.sh index 34bc0bbe..4e4ad9ab 100644 --- a/app/config/drupal-demo/download.sh +++ b/app/config/drupal-demo/download.sh @@ -30,6 +30,9 @@ pushd "$WEB_ROOT/web" git clone "${CACHE_DIR}/civicrm/org.civicrm.contactlayout.git" -b "master" civicrm/tools/extensions/org.civicrm.contactlayout extract-url --cache-ttl 172800 civicrm=http://download.civicrm.org/civicrm-l10n-core/archives/civicrm-l10n-daily.tar.gz ## or https://raw.github.com/civicrm/l10n/master/po/fr_CA/civicrm.mo => civicrm/l10n/fr_CA/LC_MESSAGES/ + pushd civicrm + composer install + popd popd popd diff --git a/app/config/drupal-demo/install.sh b/app/config/drupal-demo/install.sh index a0631618..d4eae2a1 100644 --- a/app/config/drupal-demo/install.sh +++ b/app/config/drupal-demo/install.sh @@ -35,10 +35,18 @@ if [[ "$CIVI_VERSION" =~ ^4.[0123456](\.([0-9]|alpha|beta)+)?$ ]] ; then CIVI_EXT_URL="${CMS_URL}/sites/${DRUPAL_SITE_DIR}/ext" fi -civicrm_install + +# If you've switched branches and triggered `reinstall`, then you need to refresh composer deps/autoloader before installing +(cd "$CIVI_CORE" && composer install) + +civicrm_install_cv + +## Generating `civicrm.config.php` is necessary for `extern/*.php` and its E2E tests +(cd "$CIVI_CORE" && ./bin/setup.sh -g) ############################################################################### ## Extra configuration + pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null drush -y updatedb @@ -49,11 +57,9 @@ pushd "${CMS_ROOT}/sites/${DRUPAL_SITE_DIR}" >> /dev/null ## Setup CiviCRM if cv ev 'exit(version_compare(CRM_Utils_System::version(), "5.47.alpha", "<") ?0:1);' ; then - echo '{"enable_components":["CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge","CiviCase","CiviCampaign","CiviGrant"]}' \ - | drush cvapi setting.create --in=json + cv vset '{"enable_components":["CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge","CiviCase","CiviCampaign","CiviGrant"]}' else - echo '{"enable_components":["CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge","CiviCase","CiviCampaign"]}' \ - | drush cvapi setting.create --in=json + cv vset '{"enable_components":["CiviEvent","CiviContribute","CiviMember","CiviMail","CiviReport","CiviPledge","CiviCase","CiviCampaign"]}' fi ## Note: CiviGrant disabled by default. If you enable, update the permissions as well. civicrm_apply_demo_defaults diff --git a/bin/civi-test-run b/bin/civi-test-run index d8ffe28e..a3fcb598 100755 --- a/bin/civi-test-run +++ b/bin/civi-test-run @@ -83,6 +83,7 @@ function task_phpunit() { if [ $SUITE = 'E2E_AllTests' ]; then $GUARD civibuild restore "$BLDNAME" + $GUARD cv flush --cwd="$CIVI_CORE" ## This is smelly. It begs the question of "what is leaking between tests". fi $GUARD phpunit-xml-cleanup "$JUNITDIR"/*.xml @@ -151,6 +152,7 @@ function test_core_extenions() { elif [ -f "$DIR/phpunit.xml.dist" ]; then task_phpunit_core_extension "$(basename $DIR)" $GUARD civibuild restore "$BLDNAME" + $GUARD cv flush --cwd="$CIVI_CORE" ## This is smelly. It begs the question of "what is leaking between tests". fi done } @@ -160,10 +162,12 @@ function test_afform_extensions() { pushd "$DIR" task_phpunit_core_extension "$(basename $DIR)/core" "afform-core" $GUARD civibuild restore "$BLDNAME" + $GUARD cv flush --cwd="$CIVI_CORE" ## This is smelly. It begs the question of "what is leaking between tests". cv en afform cv en --ignore-missing authx task_phpunit_core_extension "$(basename $DIR)/mock" "afform-mock" $GUARD civibuild restore "$BLDNAME" + $GUARD cv flush --cwd="$CIVI_CORE" ## This is smelly. It begs the question of "what is leaking between tests". popd } @@ -200,6 +204,7 @@ function task_upgrade() { fi $GUARD civibuild restore "$BLDNAME" + $GUARD cv flush --cwd="$CIVI_CORE" ## This is smelly. It begs the question of "what is leaking between tests". } ## Execute the upgrade test suite (via 'civicrm-upgrade-test' bash script).