# [Greenline] ICON4Py - consolidation of test setup
<!-- Add the tag for the current cycle number in the top bar -->
- Shaped by: Magdalena
- Appetite (FTEs, weeks):
- Developers: <!-- Filled in at the betting table unless someone is specifically required here -->
## Problem
<!-- The raw idea, a use case, or something we’ve seen that motivates us to work on this -->
With the growth of the functionality in `icon4py` also test configuration has become more sophisticated, but the patterns used have diverged between the pure stencil codes and the greenline functionality.
## Appetite
<!-- Explain how much time we want to spend and how that constrains the solution -->
Half a cycle should be enough to clean up most of it.
## Solution
<!-- The core elements we came up with, presented in a form that’s easy for people to immediately understand -->
The goal of the project is to consolidate.
- re-use `--backend` in greenline/ `datatest` s
- use `--grid`: allow for icon_global (R02B04), icon_local grids (MCH_CH_R04B09).
- populate the `--grid=icon_grid` from the grid file instead of reading serialized data
- (optional) test hierarchy: create a more refined testing hierarchy in order to run tests more selectively and therewith speed up CI runs
## Rabbit holes
<!-- Details about the solution worth calling out to avoid problems -->
It is not the goal of the project to refactor a lot of tests and for example bring them all to the `StencilTest` patterns, even if some of them could be converted.
## No-gos
<!-- Anything specifically excluded from the concept: functionality or use cases we intentionally aren’t covering to fit the ## appetite or make the problem tractable -->
## Progress
<!-- Don't fill during shaping. This area is for collecting TODOs during building. As first task during building add a preliminary list of coarse-grained tasks for the project and refine them with finer-grained items when it makes sense as you work on them. -->
- [x] run with grid from gridfile
- [x] use `--grid`: allow for icon_global (R02B04), icon_local grids (MCH_CH_R04B09)
- [ ] re-use `--backend` in greenline/ `datatest` s
- [ ] extract global backend in greenline -> [PR](https://github.com/C2SM/icon4py/pull/412)
- [ ] set backend from option, add a warning if run with slow or untested backend
- [ ] update `readme` s where appropriate
- [ ] (optional) improve test hierarchy