-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
create_platform_config.py: Fix so it looks like other configs #489
base: develop
Are you sure you want to change the base?
Conversation
Signed-off-by: Filip Gołaś <[email protected]>
a1f2583
to
a1d09d8
Compare
It works well now? Care to attach some example output in the comment, so we can make sure and potentially avoid merging something not working again? |
Certainly, I think I can paste it directly into a comment as it's not that long:
Contents of the new file at
Check if all lines containing '${TBD}' were moved to the new config
The definition of ${TBD} should not be moved, so it works properly when it comes to exposing all When creating configs for the odroid-h4-plus platform I have noticed that probably not all variables which often need to be changed were set to ${EMPTY} before and so now are not set to ${TBD} and are not copied to new configs. It includes, for example |
This could still be a bit improved because now all the parsing is performed manually and probably it could be made more straightforward and compatible by using robot framework libraries. |
@philipandag should this still be a draft? |
I think it should. Thre previous comment explains that. It might work unexpectedly because it does not use robot framework to read the configs and so it might break reading proper robot syntax. For example something like:
would 100% not work and the variable would be dropped. If that's fine then I think there is nothing more to add at this moment. Ideally this script should be somehow joined with the |
Ah okay I see the discussion. How about running |
If you think it's fine then it can be merged. The idea to use some parsers from robot framework is the only reason this PR is in Draft. Connecting the two scripts should probably be done as a seperate task, if at all. |
It's not what this discussion is about. The problem is that right now the process of reading, processing & writing the configs is written by me by hand and supports only the basic syntax of config files. It might cause weird behaviors where robot reads some config fine but the script skips some variables. This also adds unnecessary complexity to the script, which could otherwise be much simpler. It works most of the time but sometimes it might behave unexpectedly and is a bit redundant because robot framework already does the work of processing robot framework files. Running robotidy would not help with reading the configs, it might even break it sometimes. For example in the |
The configs were not working, the variables were not surrounded in "${" and "}", the values were scattered across different columns instead of aligned like in other configs.