jps-bootstrap: describe a new way of running tests in community

GitOrigin-RevId: d9f0a2c91436adc73d3af3a5f8b29cdd0329b69b
This commit is contained in:
Leonid Shalupov
2022-03-05 12:03:01 +01:00
committed by intellij-monorepo-bot
parent 44b7685b4f
commit cdc4024556
4 changed files with 34 additions and 1 deletions

View File

@@ -0,0 +1,11 @@
<component name="ProjectRunConfigurationManager">
<configuration default="false" name="tests in community" type="JetRunConfigurationType">
<option name="MAIN_CLASS_NAME" value="CommunityRunTestsBuildTarget" />
<module name="intellij.idea.community.build" />
<shortenClasspath name="NONE" />
<option name="VM_PARAMETERS" value="-Dintellij.build.use.compiled.classes=true -Dintellij.project.classes.output.directory=$PROJECT_DIR$/out/classes -Dintellij.build.clean.output.root=false -Dintellij.build.test.main.module=intellij.idea.community.main -Dintellij.build.test.groups=ALL_EXCLUDE_DEFINED -Dpass.idea.test.runner.index=0 -Dpass.idea.test.runners.count=1 -Dintellij.build.test.debug.suspend=false" />
<method v="2">
<option name="MakeProject" enabled="true" />
</method>
</configuration>
</component>

View File

@@ -54,7 +54,7 @@ To build IntelliJ IDEA Community Edition from source, choose **Build | Build Pro
To build installation packages, run the `installers.cmd` command in `<IDEA_HOME>` directory. `installers.cmd` will work on both Windows and Unix systems.
Options to build installers are passed as system properties to `installers.cmd` command.
You may find the list of available commands in [BuildOptions.groovy](platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy)
You may find the list of available properties in [BuildOptions.groovy](platform/build-scripts/groovy/org/jetbrains/intellij/build/BuildOptions.groovy)
Examples (`./` should be added only for Linux/macOS):
* Build installers only for current operating system: `./installers.cmd -Dintellij.build.target.os=current`
@@ -75,3 +75,17 @@ To run tests on the build, apply these setting to the **Run | Edit Configuration
You can find other helpful information at [https://www.jetbrains.com/opensource/idea](https://www.jetbrains.com/opensource/idea).
The "Contribute Code" section of that site describes how you can contribute to IntelliJ IDEA.
## Running IntelliJ IDEA on CI/CD environment
To run tests outside of IntelliJ IDEA, run the `tests.cmd` command in `<IDEA_HOME>` directory. `tests.cmd` will work on both Windows and Unix systems.
Options to run tests are passed as system properties to `tests.cmd` command.
You may find the list of available properties in [TestingOptions.groovy](platform/build-scripts/groovy/org/jetbrains/intellij/build/TestingOptions.groovy)
Examples (`./` should be added only for Linux/macOS):
* Build source code _incrementally_ (do not build what was already built before): `./tests.cmd -Dintellij.build.incremental.compilation=true`
* Run a specific test: `./tests.cmd -Dintellij.build.test.patterns=com.intellij.util.ArrayUtilTest`
`tests.cmd` is used just to run [CommunityRunTestsBuildTarget](build/scripts/CommunityRunTestsBuildTarget.kt) from the command line.
You may call it directly from IDEA, see run configuration `tests in community` for an example.

View File

@@ -3,6 +3,10 @@
GOTO :CMDSCRIPT
::CMDLITERAL
# installer.cmd builds IDEA Community installers
# THIS SCRIPTS WORKS FOR ALL SYSTEMS Linux/Windows/macOS
# See README.md for usage scenarios
set -eux
root="$(cd "$(dirname "$0")"; pwd)"
exec "$root/platform/jps-bootstrap/jps-bootstrap.sh" "$@" "$root" intellij.idea.community.build OpenSourceCommunityInstallersBuildTarget

View File

@@ -3,6 +3,10 @@
GOTO :CMDSCRIPT
::CMDLITERAL
# tests.cmd builds and runs IDEA Community tests in way suitable for calling from CI/CD like TeamCity
# THIS SCRIPTS WORKS FOR ALL SYSTEMS Linux/Windows/macOS
# See README.md for usage scenarios
set -eux
root="$(cd "$(dirname "$0")"; pwd)"
exec "$root/platform/jps-bootstrap/jps-bootstrap.sh" "$@" "$root" intellij.idea.community.build CommunityRunTestsBuildTarget