On Wed, 25 Sep 2024 12:48:16 GMT, Ambarish Rapte <ara...@openjdk.org> wrote:

>> #### Requirement:
>> We want to be able to test a JavaFX SDK built somewhere else other than on 
>> current machine or current repo on same machine. Which means we should be 
>> able to run the unit and system tests with a different JavaFX SDK.
>> 
>> #### Change:
>> ##### Run tests using a specified JavaFX SDK:
>> - Introduce a property `TEST_JAVAFX_SDK_PATH` that points to the JavaFX SDK 
>> which was built elsewhere.
>> - Modify the paths generated by build.gradle to point to the path sepcified 
>> by `TEST_JAVAFX_SDK_PATH`
>> - When a `TEST_JAVAFX_SDK_PATH` is specified `-PTEST_ONLY=true` must also be 
>> specified.
>> 
>> ##### Generate the JavaFX SDK bundle
>> - Generate the minimal JavaFX SDK bundle that is required to run the tests: 
>> We require content of the _build/sdk_ and _build/shims_ directories to 
>> achieve the same.
>> 
>> 
>> #### Verification:
>> ##### With a single machine:
>> 1. Create two local copies JavaFX repo, [repo1, repo2]
>> 2. Build sdk and shims in repo1. `gradle sdk shims`
>> 3. In repo2, run different tests as,
>>> gradle -PTEST_ONLY=true -PTEST_JAVAFX_SDK_PATH=**repo1/build**  :base:test 
>>> <any tests>
>> 4. In repo1 run `gradle all`
>> 5. `javafx-sdk-shims.zip` file would be created under repo1/build. unzip it 
>> any `unzip-path` on machine
>> 6. In repo2, run the tests by providing the `unzip-path` as 
>> TEST_JAVAFX_SDK_PATH
>>> gradle -PTEST_ONLY=true -PTEST_JAVAFX_SDK_PATH=**unzip-path**  :base:test 
>>> <any tests>
>> 
>> ##### With 2 machines.
>> 1. Run `gradle all` on a machine1
>> 2. Move build/javafx-sdk-shims.zip to machine2 and unzip to any `unzip-path`
>> 3. Run the tests by providing the `unzip-path` as TEST_JAVAFX_SDK_PATH
>>> gradle -PTEST_ONLY=true -PTEST_JAVAFX_SDK_PATH=**unzip-path**  :base:test 
>>> <any tests>
>> 
>> 
>> #### Additional changes:
>> Additionally we observed that three unit tests failed because they access a 
>> specific path. A path that would no exists when JavaFX SDK is not built.
>> 1. Controls test: test.javafx.scene.control.ControlTest.testRT18097
>> It required path: 
>> modules/javafx.controls/build/classes/java/main/javafx.controls/javafx
>> It is fixed by change on line 2811
>> 
>> 2. Graphics test: test.javafx.css.CssMetaDataTest.testRT18097
>> It required path: 
>> modules/javafx.graphics/build/classes/java/main/javafx.graphics/javafx
>> It is fixed by change on line 2722
>> 
>> 3. Base test: test.com.sun.javafx.runtime.VersionInfoTest
>> It required path: build/module-lib/javafx.properties
>> VersionInfoTest is specific to the local build of JavaFX. So, It can be 
>> safely ...
>
> Ambarish Rapte has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   task for creating run args when -PTEST-ONLY=true

Updated dependency looks good.

@lukostyra Can you be the second reviewer?

-------------

Marked as reviewed by kcr (Lead).

PR Review: https://git.openjdk.org/jfx/pull/1577#pullrequestreview-2328511658
PR Comment: https://git.openjdk.org/jfx/pull/1577#issuecomment-2374307693

Reply via email to