Skip to content

implement programatic expansion of metadata - macros #152

@sopos

Description

@sopos

Example:
imagine this metadata:

/old-syntax:
        environment+:
            rsyslogSyntax: old
        /x509_name:
            extra-summary: CONDITIONAL_PHASES_BL=ossl rsyslogSyntax=old /rsyslog/Sanity/gnutls-openssl
/new-syntax:
        environment+:
            rsyslogSyntax: new
        /x509_name:
            extra-summary: CONDITIONAL_PHASES_BL=ossl rsyslogSyntax=new /rsyslog/Sanity/gnutls-openssl

to simplify it one could use something like:

%for syntax in [old, new]:
/%syntax%-syntax:
        environment+:
            rsyslogSyntax: %syntax%
        /x509_name:
            extra-summary: CONDITIONAL_PHASES_BL=ossl rsyslogSyntax=%syntax% /rsyslog/Sanity/gnutls-openssl
%rof

For more metadata worth simplification see https://github.com/RedHat-SP-Security/tests/blob/69e188bad1da05dbdbf21d102bcec25655ec9a3b/rsyslog/Sanity/gnutls-openssl/main.fmf#L57
The life metadata cannot be used directly due to nitrate TC mapping but it could be easily without it.

The fmf files would be pre-processed using a metalanguage and then processed as usual.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    Status

    waiting

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions