Open BenReim opened 5 years ago
I think this is more of an enhancement, but definitely something we should look into.
Currently, test-resources
might be required when one libraries tests depend on test specific helper modules located in another libraries test-resources
. This means we'll probably need a switch of some sort. Possibly something like:
Command | Result |
---|---|
ui5 build --all |
Everything (current behavior) |
ui5 build --runtime |
Like --all but excluding test-resources |
Hi, @RandomByte . Any news on this topic? Or is it safe to exclude tests with any CLI param?
Cheers, Henrique
This issue is rather old and didn't get updated. By now you can configure excludes for resources like /test-resources/**
in the ui5.yaml: https://sap.github.io/ui5-tooling/stable/pages/Configuration/#exclude-resources
@matz3 should we close this? I think the main requirement got implemented. Although we could discuss the default behavior more.
In current version the "test-resources" folder is still part of the dist folder, including all dependencies
UI5 CLI Version:
3.11.0
UI5 YAML Version:
3.2
console script:
ui5 build --clean-dest --all
ui5.yaml
specVersion: "3.2"
metadata:
name: **hide**
type: application
framework:
name: OpenUI5
version: 1.120.10
libraries:
- name: sap.f
- name: sap.m
- name: sap.ui.core
- name: sap.ui.layout
- name: themelib_sap_horizon
- name: sap.tnt
resources:
configuration:
paths:
webapp: /out
builder:
resources:
excludes:
- "/localService/**"
- "/test/**"
- "/test-resources/**"
current output:
- dist
- resources
- test-resources
- ...additionalFiles
expected output:
- dist
- resources
- ...additionalFiles
@CLVNSwan thanks. That's true. If the dependency is not your own project, you can't define excludes on the respective test-resources.
hi, @RandomByte . Is there a specific reason why we include the test-resources (i.e. from OpenUI5/SAPUI5 resources)? This makes my build longer, and my push to AWS S3 (CDN) 10x longer.
I'm not sure if I read somewhere that this could happen because some productive components rely on test resources (or vice-versa)?! Or do you know a different reasoning for including the test-resources from productive components?
Kind regards, Henrique
hi, @RandomByte . Is there a specific reason why we include the test-resources (i.e. from OpenUI5/SAPUI5 resources)?
This was caused by a misconfiguration in the release process affecting the sap.ui.core library. We have fixed the issue and all new releases should not contain this vast amount of test-resources anymore.
Affected versions are all current releases between UI5 1.115 and 1.127.
1.128.0 is already fixed, all coming patch releases should be fixed as well.
That's awesome! Thank you so much!!! Gotta 💙 UI5 Team!
Expected Behavior
test-resources
of project dependencies shall not be part of a (production) buildCurrent Behavior
test-resources
folder is part of the build resultSteps to reproduce the issue
Clone ui5lab sample library
git clone https://github.com/UI5Lab/UI5Lab-library-simple
Build library
ui5 build --a
Check the content of the
dist
folder - containstest-resources
of dependencies