Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0046551Openbravo ERPA. Platformpublic2021-05-05 16:542021-05-19 09:22
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
PR20Q4.5PR20Q4.4 
alostale
Core
No
0046551: ant compile.test does not work incrementally because of wrong src definition
That ant target is used as dependency in any run of junit tests via ant.

It has a wrong src definition where the file-location in which the sources are found does not match the java-package.

That is similar to what we fixed in 20416 for the main compilation.

Effect of this bug is re-compiling 580 sources on every run of this target.
Example runtime:
- current ca. 41 seconds
- fixed: ca. 24 seconds

Apart from local waiting that is also run several times in many ci jobs:
- At least twice for stand-alone + webservice tests
- in jobs with custom junit tests even more times (+1 per each module)
  i.e. mod-platform runs that compile step 6 times and other mod-* jobs even more times

run ant compile.test
run ant compile.test a second time

Notice that the 2nd compilation does compile many sources files when it should compile 0 (as there are no source changes).
No tags attached.
blocks defect 0046521PR21Q3 closed shuehner ant compile.test does not work incrementally because of wrong src definition 
Issue History
2021-05-06 14:39shuehnerTypedefect => backport
2021-05-06 14:39shuehnerTarget VersionPR21Q3 => PR20Q4.4
2021-05-19 07:31alostaleTarget VersionPR20Q4.4 => PR20Q4.5
2021-05-19 07:42hgbotNote Added: 0128368
2021-05-19 09:22hgbotResolutionopen => fixed
2021-05-19 09:22hgbotStatusscheduled => resolved
2021-05-19 09:22hgbotNote Added: 0128380
2021-05-19 09:22hgbotFixed in Version => PR20Q4.4
2021-05-19 09:22hgbotNote Added: 0128381
2021-05-19 09:22alostaleAssigned Toplatform => shuehner
2021-05-19 09:22alostaleReview Assigned To => alostale
2021-05-19 09:22alostaleStatusresolved => closed

Notes
(0128368)
hgbot   
2021-05-19 07:42   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/371 [^]
(0128380)
hgbot   
2021-05-19 09:22   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/371 [^]
(0128381)
hgbot   
2021-05-19 09:22   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: bdc313d93f8e5e48b7be0ddc2e08bee5d83be3ee
Author: Stefan Hühner <stefan.huehner@openbravo.com>
Date: 2021-05-19T09:10:13+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/bdc313d93f8e5e48b7be0ddc2e08bee5d83be3ee [^]

fixed BUG-46551: ant compile.test does not work incrementally

Whenever compile.test task was executed all test classes were compiled
instead of doing an incremental compilation of the only the ones whose
source files changed since last compilation.

This was caused by an incorrect path definition of tests in core module,
sources are within src-test/src directory but pathelement was declared
as src-test only, this makes ant not to be able to detect changes and to
always compile all the files. See [1].

[1] https://ant.apache.org/faq.html#always-recompiles [^]

---
M src-test/build.xml
---