Proposal for framework usage and configuration #5
Replies: 3 comments 4 replies
-
Thanks for the staring the discussion @miguelafsilva5. There are some points I want to discuss:
I'm struggling what to understand why we need to configure the toolchains using the yaml files. Can't we just re-use the Makefile and tool infrastructure that will build the the module-under-test? Those build components must already know what toolchain to use outside the testing framework.
Can you refresh my mind on why they must be absolute. And why the are absolutely needed. I'd say we could have relative path defaults (from which we could eventually calculate the absolute ones), making this file optional (only needed if the developer wants to configure these paths to custom ones.
I also don't like having the tests directory inside the src directory. I would suggest they can be side by side. To be clearer which folder would have the actual tests we would have the bao-tests submodule named test-framework. And maybe have it inside the actual tests folder:
Now as for the remaining files in the tests directory, I'm still not sure how they are actually used. First, I'm confused on the difference between test batteries and test suites. Aren't they both "groups of tests? Why do we need two levels of grouping? What is the semantics of each level here. Nevertheless, FWIU, the yaml battery files are used to trigger either a build or a run of one or multiple suites of tests. Based on the suite definitions, the framework will gather the needed source files for each suite from tests/src and build them. Is this correct? Would it make sense to define each tests, then test suites, then batteries separately? That is, separate folder and/or files? Is each test supposed to be compiled in a single binary? If so, e could move part of the logic to Makefiles directly: having a separate folder for each directory containing the sources and the Makefile on how to build that test. Or are suites grouped in a single binary? If so, we could have a Makefile per-suite that would gather the makefiles of each test. I'm thinking we first need to define these terms (test, suite, battery) clearly before coming up with the file layout and build logic.
Do you mean the partition configuration in the device-tree format (as used to configure the tool "normally")? I would say this is an issue I hadn't forseen because the partition binary paths are supposed to be embedded in the device tree. |
Beta Was this translation helpful? Give feedback.
-
One idea: maybe we could have a draft PR with this structure so we could look at it more clearly as we discuss. |
Beta Was this translation helpful? Give feedback.
-
Thanks for opening the discussion @miguelafsilva5 .
I agree with the overall points mentioned by @josecm. My main point will be that we should try to avoid the dispersion of files and the increase on the number of configuration files. IMHO, we can force, e.g., directory paths, if the only reason to allow them to be in different places is to satisfy the "developers preference". Sorry, if I misunderstood any of the points; nevertheless, with a draft PR probably I can have a better understanding of the overall structure. |
Beta Was this translation helpful? Give feedback.
-
Hello,
As we have discussed in previous meetings, me and @Diogo21Costa were to propose the organization of our framework across all bao components.
We assume that our repo is to be added across all bao elements, similarly to the ci repo.
Taking this into consideration our proposed directory organization is the following: (- is a directory and * is a file)
Lastly, the we have two suggestions for the highlighted .yaml files (config.yaml and example.yaml).
The config.yaml is to filled by each developer with their own directoy path. From early discussions, we established that all directories must absolute, and thus, such a file is needed. This is what we propose:
The example.yaml file should be placed inside a folder on the path defined in tests_dir. The folder represents a group of tests (battery). These tests can be configured in a single yaml file or in multiple files. The idea is to allow the developer to group their tests, and use multiple yaml files to differentiate tests running in different platforms, for instance.
(Note that when running our framework a battery name should be provided, e.g., make run example)
If you have any suggestions or see any problems, feel free to discuss.
Thank you,
Miguel Silva
@bao-project/core
Beta Was this translation helpful? Give feedback.
All reactions