Openbravo Issue Tracking System - Openbravo ERP
View Issue Details
0046521Openbravo ERPA. Platformpublic2021-05-05 16:542021-05-19 09:21
shuehner 
shuehner 
normalminorhave not tried
closedfixed 
5
 
PR21Q3PR21Q3 
alostale
Core
No
0046521: 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.
related to feature request 0020416 closed marvintm Improve compilation task so that it doesn't always compile java files inside the modules folder 
depends on backport 0046549PR21Q2 closed shuehner ant compile.test does not work incrementally because of wrong src definition 
depends on backport 0046550PR21Q1.3 closed shuehner ant compile.test does not work incrementally because of wrong src definition 
depends on backport 0046551PR20Q4.5 closed shuehner ant compile.test does not work incrementally because of wrong src definition 
diff 46521.diff (560) 2021-05-05 16:56
https://issues.openbravo.com/file_download.php?file_id=15654&type=bug
Issue History
2021-05-05 16:54shuehnerNew Issue
2021-05-05 16:54shuehnerAssigned To => platform
2021-05-05 16:54shuehnerModules => Core
2021-05-05 16:54shuehnerTriggers an Emergency Pack => No
2021-05-05 16:54shuehnerRelationship addedrelated to 0020416
2021-05-05 16:56shuehnerFile Added: 46521.diff
2021-05-05 16:57shuehnerNote Added: 0127837
2021-05-05 16:57shuehnerTarget Version => PR21Q3
2021-05-06 14:39shuehnerStatusnew => scheduled
2021-05-19 07:47alostaleAssigned Toplatform => shuehner
2021-05-19 09:14hgbotNote Added: 0128370
2021-05-19 09:21hgbotResolutionopen => fixed
2021-05-19 09:21hgbotStatusscheduled => resolved
2021-05-19 09:21hgbotNote Added: 0128378
2021-05-19 09:21hgbotFixed in Version => PR21Q3
2021-05-19 09:21hgbotNote Added: 0128379
2021-05-19 09:21alostaleReview Assigned To => alostale
2021-05-19 09:21alostaleStatusresolved => closed

Notes
(0127837)
shuehner   
2021-05-05 16:57   
Candidate for back-patching to all versions we cover in CI (including customer jobs) to get the speed benefit.
(0128370)
hgbot   
2021-05-19 09:14   
Merge Request created: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/372 [^]
(0128378)
hgbot   
2021-05-19 09:21   
Merge request merged: https://gitlab.com/openbravo/product/openbravo/-/merge_requests/372 [^]
(0128379)
hgbot   
2021-05-19 09:21   
Repository: https://gitlab.com/openbravo/product/openbravo [^]
Changeset: fbdc484fc99309f1b21ecc6cdf436b182bfe2257
Author: Stefan Hühner <stefan.huehner@openbravo.com>
Date: 2021-05-19T09:13:11+02:00
URL: https://gitlab.com/openbravo/product/openbravo/-/commit/fbdc484fc99309f1b21ecc6cdf436b182bfe2257 [^]

fixed BUG-46521: 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
---