Skip to content
GitLab
Projects Groups Topics Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • slapos slapos
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributor statistics
    • Graph
    • Compare revisions
  • Merge requests 129
    • Merge requests 129
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Jobs
  • Commits
Collapse sidebar
  • nexedinexedi
  • slaposslapos
  • Merge requests
  • !1526

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

  • Review changes

  • Download
  • Patches
  • Plain diff
Merged Kirill Smelkov requested to merge kirr/slapos:y/yamlpp into master Jan 25, 2024
  • Overview 3
  • Commits 3
  • Pipelines 0
  • 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
Reviewers
Request review from
Time tracking
Source branch: y/yamlpp
GitLab Nexedi Edition | About GitLab | About Nexedi | 沪ICP备2021021310号-2 | 沪ICP备2021021310号-7