Allow to set `building` in the tests dict
I maintainer di solito rispondono entro 1 giorno
Nessuno ha ancora preso questa issue.
Valutazione
- Difficoltà
- 4/5
- Tempo stimato
- 1-2 giorni
- Idoneità per principianti
- 35/100
- Tipo di issue
- Funzionalità
- Chiarezza
- Abbastanza chiara
- Stato di attività
- Attiva
- Stack tecnologico
- python
- Ambito
- build-system
Direzione di ricerca
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.
Scritto dal modello di indicizzazione a partire dal testo della issue.
Descrizione
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
- Lingua principale
- Python
- Stelle
- 1.1k
- Fork
- 370
- Merge medio
- 2g 10h
- PR unite (30g)
- 11
Preparare l'ambiente
- Nessun Dockerfile né file Docker Compose
- Nessun modello di pull request
- Leggi la guida per i contributori
Come iniziare
- Leggi tutta la issue e poi la guida ai contributi del progetto.
- Commenta sulla issue per dire che te ne occupi tu — evita che due persone facciano lo stesso lavoro.
- Fai un fork del repository e lavora su un branch.
- Apri una pull request che faccia riferimento al numero della issue.
Altre issue di AcademySoftwareFoundation/rez
-
difficulty/easy documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
AcademySoftwareFoundation/rez#2239 ·
I maintainer di solito rispondono entro 1 giorno
-
_rez_fwd ++version causes exception with ++versionsForse già presa @ClementHector l’ha presa 73 giorni fa. Apertabug difficulty/medium help wanted rez-suite
Difficoltà 2/5 1-3 ore Idoneità per principianti 74/100
AcademySoftwareFoundation/rez#2046 · 2 commenti · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
ASWF documentation
Difficoltà 2/5 1-3 ore Idoneità per principianti 45/100
AcademySoftwareFoundation/rez#2266 ·
I maintainer di solito rispondono entro 1 giorno
-
[DRAFT] PowerShell shell plugins: bug-fix passForse già presa @instinct-vfx l’ha presa 4 giorni fa. Apertaos:windows shell
AcademySoftwareFoundation/rez#2263 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
-
Add documentation for context trackingForse già presa @instinct-vfx l’ha presa 8 giorni fa. Apertadocumentation enhancement
AcademySoftwareFoundation/rez#2255 · 1 assegnatario ·
I maintainer di solito rispondono entro 1 giorno
Tutte le issue di AcademySoftwareFoundation/rez
Issue simili
-
factory:subtask
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 94/100
I maintainer di solito rispondono entro 1 giorno
-
documentation good first issue
Difficoltà 1/5 Meno di un'ora Idoneità per principianti 95/100
shuxiachai/academic-commercialization-agent#533 ·
I maintainer di solito rispondono entro 1 giorno
-
Difficoltà 2/5 1-3 ore Idoneità per principianti 78/100
sierra-research/tau2-bench#804 ·
I maintainer di solito rispondono entro 3 giorni
-
bug
Difficoltà 1/5 1-3 ore Idoneità per principianti 91/100
gracecraft-software/lupin#423 · 1 commento ·
-
Event of a rate-limit waitApertaarea:runtime
Difficoltà 2/5 1-3 ore Idoneità per principianti 72/100
I maintainer di solito rispondono entro 1 giorno