summaryrefslogtreecommitdiffstatshomepage
path: root/core/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'core/scripts')
-rwxr-xr-xcore/scripts/dev/commit-code-check.sh15
-rwxr-xr-xcore/scripts/run-tests.sh16
2 files changed, 25 insertions, 6 deletions
diff --git a/core/scripts/dev/commit-code-check.sh b/core/scripts/dev/commit-code-check.sh
index 541692236263..42d2ac670ad8 100755
--- a/core/scripts/dev/commit-code-check.sh
+++ b/core/scripts/dev/commit-code-check.sh
@@ -25,6 +25,7 @@ contains_element() {
return 1
}
+MEMORY_UNLIMITED=0
CACHED=0
DRUPALCI=0
BRANCH=""
@@ -58,12 +59,22 @@ while test $# -gt 0; do
DRUPALCI=1
shift
;;
+ --memory-unlimited)
+ MEMORY_UNLIMITED=1
+ shift
+ ;;
*)
break
;;
esac
done
+memory_limit=""
+
+if [[ "$MEMORY_UNLIMITED" == "1" ]]; then
+ memory_limit="--memory-limit=-1"
+fi
+
# Set up variables to make colored output simple. Color output is disabled on
# DrupalCI because it is breaks reporting.
# @todo https://www.drupal.org/project/drupalci_testbot/issues/3181869
@@ -238,11 +249,11 @@ printf "\n"
# APCu is disabled to ensure that the composer classmap is not corrupted.
if [[ $PHPSTAN_DIST_FILE_CHANGED == "1" ]] || [[ "$DRUPALCI" == "1" ]]; then
printf "\nRunning PHPStan on *all* files.\n"
- php -d apc.enabled=0 -d apc.enable_cli=0 vendor/bin/phpstan analyze --no-progress --configuration="$TOP_LEVEL/core/phpstan.neon.dist"
+ php -d apc.enabled=0 -d apc.enable_cli=0 vendor/bin/phpstan analyze --no-progress --configuration="$TOP_LEVEL/core/phpstan.neon.dist" $memory_limit
else
# Only run PHPStan on changed files locally.
printf "\nRunning PHPStan on changed files.\n"
- php -d apc.enabled=0 -d apc.enable_cli=0 vendor/bin/phpstan analyze --no-progress --configuration="$TOP_LEVEL/core/phpstan-partial.neon" $ABS_FILES
+ php -d apc.enabled=0 -d apc.enable_cli=0 vendor/bin/phpstan analyze --no-progress --configuration="$TOP_LEVEL/core/phpstan-partial.neon" $ABS_FILES $memory_limit
fi
if [ "$?" -ne "0" ]; then
diff --git a/core/scripts/run-tests.sh b/core/scripts/run-tests.sh
index a1a9d903af03..dd831ee38ad3 100755
--- a/core/scripts/run-tests.sh
+++ b/core/scripts/run-tests.sh
@@ -179,10 +179,18 @@ if (!Composer::upgradePHPUnitCheck(Version::id())) {
echo "\n";
echo "Drupal test run\n\n";
-echo sprintf("Drupal Version: %s\n", \Drupal::VERSION);
-echo sprintf("PHP Version: %s\n", \PHP_VERSION);
-echo sprintf("PHP Binary: %s\n", $php ?? getenv('_'));
-echo sprintf("PHPUnit Version: %s\n", Version::id());
+echo sprintf("Drupal Version: %s\n", \Drupal::VERSION);
+echo sprintf("PHP Version: %s\n", \PHP_VERSION);
+echo sprintf("PHP Binary: %s\n", $php ?? getenv('_'));
+echo sprintf("PHPUnit Version: %s\n", Version::id());
+if ($args['dburl']) {
+ $sut_connection_info = Database::getConnectionInfo();
+ $sut_tasks_class = $sut_connection_info['default']['namespace'] . "\\Install\\Tasks";
+ $sut_installer = new $sut_tasks_class();
+ $sut_connection = Database::getConnection();
+ echo sprintf("Database: %s\n", (string) $sut_installer->name());
+ echo sprintf("Database Version: %s\n", $sut_connection->version());
+}
echo "-------------------------------\n";
echo "\n";