Skip to content
Snippets Groups Projects
Commit 846e3930 authored by Stefan Bürk's avatar Stefan Bürk
Browse files

[TASK] Add runTest.sh -s clean to remove build related files

Add script to 'Build/Scripts/runTests.sh' to clean build and
test related files and folders to get fast a clean state.
Local instance related files are untouched and kept intact.

Added commands:

> Build/Scripts/runTests.sh -s clean
> Build/Scripts/runTests.sh -s cleanBuild
> Build/Scripts/runTests.sh -s cleanCache
> Build/Scripts/runTests.sh -s cleanTests

Resolves: #97355
Releases: main, 11.5, 10.4
Change-Id: I05c9dd966f4703315474e369dad52b1a40881c60
Reviewed-on: https://review.typo3.org/c/Packages/TYPO3.CMS/+/74400


Tested-by: default avatarcore-ci <typo3@b13.com>
Tested-by: default avatarStefan Bürk <stefan@buerk.tech>
Reviewed-by: default avatarStefan Bürk <stefan@buerk.tech>
parent d5a0aec6
Branches
Tags
No related merge requests found
...@@ -72,6 +72,33 @@ handleDbmsAndDriverOptions() { ...@@ -72,6 +72,33 @@ handleDbmsAndDriverOptions() {
esac esac
} }
cleanBuildFiles() {
# > builds
echo -n "Clean builds ... " ; rm -rf \
../../../Build/JavaScript \
../../../Build/node_modules ; \
echo "done"
}
cleanCacheFiles() {
# > caches
echo -n "Clean caches ... " ; rm -rf \
../../../.cache \
../../../Build/.cache \
../../../Build/.phpunit.result.cache ; \
echo "done"
}
cleanTestFiles() {
# > test related
echo -n "Clean test related files ... " ; rm -rf \
../../../Build/FunctionalTests-Job-*.xml \
../../../typo3/sysext/core/Tests/Acceptance/AcceptanceTests-Job-* \
../../../typo3/sysext/core/Tests/Acceptance/Support/_generated \
../../../typo3temp/var/tests/ ; \
echo "done"
}
# Load help text into $HELP # Load help text into $HELP
read -r -d '' HELP <<EOF read -r -d '' HELP <<EOF
TYPO3 core test runner. Execute acceptance, unit, functional and other test suites in TYPO3 core test runner. Execute acceptance, unit, functional and other test suites in
...@@ -103,6 +130,10 @@ Options: ...@@ -103,6 +130,10 @@ Options:
- checkGruntClean: Verify "grunt build" is clean. Warning: Executes git commands! Usually used in CI only. - checkGruntClean: Verify "grunt build" is clean. Warning: Executes git commands! Usually used in CI only.
- checkPermissions: test some core files for correct executable bits - checkPermissions: test some core files for correct executable bits
- checkRst: test .rst files for integrity - checkRst: test .rst files for integrity
- clean: clean up build, cache and testing related files and folders
- cleanBuild: clean up build related files and folders
- cleanCache: clean up cache related files and folders
- cleanTests: clean up test related files and folders
- composerInstall: "composer install" - composerInstall: "composer install"
- composerInstallMax: "composer update", with no platform.php config. - composerInstallMax: "composer update", with no platform.php config.
- composerInstallMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0. - composerInstallMin: "composer update --prefer-lowest", with platform.php set to PHP version x.x.0.
...@@ -533,6 +564,20 @@ case ${TEST_SUITE} in ...@@ -533,6 +564,20 @@ case ${TEST_SUITE} in
SUITE_EXIT_CODE=$? SUITE_EXIT_CODE=$?
docker-compose down docker-compose down
;; ;;
clean)
cleanBuildFiles
cleanCacheFiles
cleanTestFiles
;;
cleanBuild)
cleanBuildFiles
;;
cleanCache)
cleanCacheFiles
;;
cleanTests)
cleanTestFiles
;;
composerInstall) composerInstall)
setUpDockerComposeDotEnv setUpDockerComposeDotEnv
docker-compose run composer_install docker-compose run composer_install
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment