Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
slapos slapos
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Labels
    • Labels
  • Merge requests 122
    • Merge requests 122
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Environments
  • Analytics
    • Analytics
    • CI/CD
    • Repository
    • Value Stream
  • Snippets
    • Snippets
  • Members
    • Members
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedi
  • slaposslapos
  • Merge requests
  • !1526

Merged
Created Jan 25, 2024 by Kirill Smelkov@kirrOwner

software/ors-amarisoft: test: Preprocess enb.cfg & co on YAML loading

  • Overview 3
  • Commits 3
  • Changes 13

Current enb config is already quite complex and with MultiRU it will be growing more - both with added features and with more sections emitted because there will be multiple radio units, multiple cells and cross cell interactions. So for clarity we will want to annotate with a comment to which cell or ru object a section belongs, or to which cell-cell pair a particular interaction belongs.

Amarisoft supports C-style comments and preprocessor directives out of the box, but if we use them in the configuration files, yaml.load, that we use in the test to load generated configs, will break, because // and /* ... */ is not valid YAML. It looks like Amarisoft does preprocessing as a separate step before further loading given configuration via yaml.

So to be able to use the comments and still have tests working we need to do the same - in the tests preprocess the files before feeding them to yaml loader.

-> Do that with the help of https://pypi.org/project/pcpp/

In my view that library has good quality and in my experience it worked flawlessly. Anyway we need it to only handle comments, not sophisticated CPP features, and for that it works just ok.

Add some comments to existing enb.cfg and ue.cfg to make sure it really works. Those are simple comments, and in current state it they might seem as not 100% necessary, but with more upcoming config changes it would be good to have those descriptionary anchors present in the generated configs, so I suggest we add them. Anyway they should not do any harm at all.

/cc @jhuge, @lu.xu, @tomo, @xavier_thompson, @Daetalus

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Source branch: y/yamlpp
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7