Skip to content

Commit

Permalink
Use absolute path to run tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
chesn0k committed May 16, 2024
1 parent 930a6b9 commit 4eb3c0c
Showing 1 changed file with 16 additions and 16 deletions.
32 changes: 16 additions & 16 deletions scripts/sut-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ if [[ $test_filter = all || $test_filter = form ]]; then

dcg_phpcs --exclude=DrupalPractice.Yaml.RoutingAccess .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand Down Expand Up @@ -200,7 +200,7 @@ if [[ $test_filter = all || $test_filter = module_component ]]; then

dcg_phpcs .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand Down Expand Up @@ -242,7 +242,7 @@ if [[ $test_filter = all || $test_filter = plugin ]]; then
dcg_module_install $module_machine_name
echo 'Build CKEditor plugin...'
npm install && npm run build
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand Down Expand Up @@ -274,7 +274,7 @@ if [[ $test_filter = all || $test_filter = service ]]; then

dcg_phpcs $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
# Do not uninstall this module as the uninstall validator prevents it.
fi

Expand All @@ -299,7 +299,7 @@ if [[ $test_filter = all || $test_filter = yml ]]; then

dcg_phpcs $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -321,7 +321,7 @@ if [[ $test_filter = all || $test_filter = test ]]; then

dcg_phpcs --exclude=Generic.CodeAnalysis.UselessOverridingMethod $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -347,7 +347,7 @@ if [[ $test_filter = all || $test_filter = theme_component ]]; then

dcg_phpcs --exclude=Generic.CodeAnalysis.UselessOverridingMethod $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -366,7 +366,7 @@ if [[ $test_filter = all || $test_filter = plugin_manager ]]; then

dcg_phpcs .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -383,7 +383,7 @@ if [[ $test_filter = all || $test_filter = configuration_entity ]]; then

dcg_phpcs .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -402,7 +402,7 @@ if [[ $test_filter = all || $test_filter = content_entity ]]; then

dcg_phpcs .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name

dcg_label 'Content entity (with fields)'
Expand All @@ -418,7 +418,7 @@ if [[ $test_filter = all || $test_filter = content_entity ]]; then

dcg_phpcs .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name

dcg_label 'Content entity (without bundles, fields and canonical page)'
Expand All @@ -434,7 +434,7 @@ if [[ $test_filter = all || $test_filter = content_entity ]]; then

dcg_phpcs .
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -450,7 +450,7 @@ if [[ $test_filter = all || $test_filter = bundle_class ]]; then
$dcg entity:bundle-class -a acme -a Acme -a User -a UserBundle -a Yes -a UserBase
dcg_phpcs $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -468,7 +468,7 @@ if [[ $test_filter = all || $test_filter = module ]]; then

dcg_phpcs $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -491,7 +491,7 @@ if [[ $test_filter = all || $test_filter = theme ]]; then
dcg_phpcs $theme_dir
dcg_phpcs $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

Expand All @@ -509,6 +509,6 @@ if [[ $test_filter = all || $test_filter = drush ]]; then

dcg_phpcs $module_dir
dcg_module_install $module_machine_name
dcg_phpunit tests
dcg_phpunit $drupal_dir/modules/$module_machine_name/tests
dcg_module_uninstall $module_machine_name
fi

0 comments on commit 4eb3c0c

Please sign in to comment.