Allow to set `building` in the tests dict
Maintainer thường phản hồi trong vòng 3 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 1-2 ngày
- Mức phù hợp với người mới
- 35/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- python
- Lĩnh vực
- build-system
Hướng nghiên cứu
This is a proposal to accept a building key in each tests entry so a test runs in the same environment as rez env --build <pkg>. Start with the issue's example and the rez docs on the building attribute and tests, then read #2211, which the issue depends on. Done means a test entry with building: True gets the build environment, including build-only requires, and other tests are unchanged. Since the design is still open, check with maintainers before writing code.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
A stepping stone to #2211 — or some variant of that — is to be able to set the building attribute for a test in the tests dict.
It would look something like:
def commands():
if building:
env.PKG_CONFIG_PATH.prepend("{root}/lib/pkgconfig")
tests = {
"pkgconf": {
"command": "pkg-config mylib",
"requires": ["pkgconf"],
"building": True,
"run_on": ["default", "pre_release"]
},
}
The environment would be equivalent to the one you get with rez env --build <current_pkg> + <testing_pkgs>
Motivation
I encountered an issue when trying to add some tests for a C++ package. Our packages only prepend things to PKG_CONFIG_PATH or CMAKE_PREFIX_PATH when building is true. Similar to what the rez documentation for the building attribute shows with the env.FOO_INCLUDE_PATH example.
A workaround would be to change if building: to if building or testing:. But you don't necessarily want the build specific options for all of your tests. Most tests you would want the environment to be as when you run rez env <current_pkg>.
And in our case that would require a lot of effort. I did a quick grep and we have ~430 rez releases with if building:, not all of them are still in use but a substantial chunk of them would need to be fixed.
Another thing that if building and testing:wouldn't fix, is the build specific dependencies you get when specifying rez env --build. Those you would need to manually add to the test's requires in order to get a similar environment as the building environment.
Having the option to opt-in to a build environment for a given test would solve all of this and avoid muddying the waters between the building and testing attribute.
This would allow us to test things like if the pkgconfig file a package generated works as expected. And run source specific tests with some gotchas.
Related Issues/PRs
- #2211
- Ngôn ngữ chính
- Python
- Star
- 1.1k
- Fork
- 370
- Merge trung bình
- 4 ngày 9 giờ
- Pull request đã merge (30 ngày)
- 11
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Không có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của AcademySoftwareFoundation/rez
-
difficulty/easy documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
AcademySoftwareFoundation/rez#2239 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
_rez_fwd ++version causes exception with ++versionsCó thể đã có người làm @ClementHector đã nhận 73 ngày trước. Đang mởbug difficulty/medium help wanted rez-suite
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 74/100
AcademySoftwareFoundation/rez#2046 · 2 bình luận · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
-
rez-selftest doesn't test subfoldered test filesCó thể đã có người làm @maxnbk đã nhận hôm nay. Đang mở
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 35/100
AcademySoftwareFoundation/rez#2267 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
ASWF documentation
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 45/100
AcademySoftwareFoundation/rez#2266 ·
Maintainer thường phản hồi trong vòng 3 ngày
-
[DRAFT] PowerShell shell plugins: bug-fix passCó thể đã có người làm @instinct-vfx đã nhận 4 ngày trước. Đang mởos:windows shell
AcademySoftwareFoundation/rez#2263 · 1 người được giao ·
Maintainer thường phản hồi trong vòng 3 ngày
Tất cả issue của AcademySoftwareFoundation/rez
Issue tương tự
-
area/auth comp/agent P3 type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
NousResearch/hermes-agent#161417 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 75/100
Maintainer thường phản hồi trong vòng 2 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 88/100
Dao-AILab/flash-attention#3251 ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[Bug] DeepSpeedEngine.step leaves _running_engine_step=True permanently on exception, corrupting is_gradient_accumulation_boundary()Có thể đã có người làm @its-amann đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 85/100
deepspeedai/DeepSpeed#9190 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 2 ngày
-
[New Check]: sqlserver_public_network_access_disabledCó thể đã có người làm @pouria-l đã nhận hôm nay. Đang mởfeature-request status/needs-triage
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
prowler-cloud/prowler#13607 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày