Commit d06cefd9 authored by David Flynn's avatar David Flynn
Browse files

tools: make gen-cfg derive per-configuration pcerrorflags

This commit makes gen-cfg understand a pcerrorflag value on a
per test category basis in the same way as enc|decflags.
parent 49c6c78f
...@@ -28,20 +28,16 @@ Configuration generation proceeds as follows: ...@@ -28,20 +28,16 @@ Configuration generation proceeds as follows:
- `$prefix/$category/$sequence/$variant/decoder.cfg` - `$prefix/$category/$sequence/$variant/decoder.cfg`
- `$prefix/$category/$sequence/$variant/pcerror.cfg` - `$prefix/$category/$sequence/$variant/pcerror.cfg`
To generate an encoder or decoder configuration, cfgOptions are gathered in To generate an encoder, decoder or pcerror configuration, cfgOptions are
the following order: gathered in the following order:
- `encflags`/`decflags` from the global 'sequences' - `encflags`/`decflags`/`pcerrorflags` from the global 'sequences'
for the current sequence name for the current sequence name
- `encflags`/`decflags` for the current variant - `encflags`/`decflags`/`pcerrorflags` for the current variant
from the current category from the current category
- `encflags`/`decflags` for the current variant - `encflags`/`decflags`/`pcerrorflags` for the current variant
from the current category-sequence from the current category-sequence
To generate a pcerror configuration, options are the pcerrorflags from the
global sequences for the current sequence name.
Semantics of a yaml-cfg-file Semantics of a yaml-cfg-file
---------------------------- ----------------------------
...@@ -116,6 +112,9 @@ configuration option in the form `$key: $value` ...@@ -116,6 +112,9 @@ configuration option in the form `$key: $value`
- `.decflags=[].$cfgOption` - `.decflags=[].$cfgOption`
(optional) an ordered list of category-specific options for decoder.cfg (optional) an ordered list of category-specific options for decoder.cfg
- `.pcerrorflags=[].$cfgOption`
(optional) an ordered list of category-specific options for pcerror.cfg
- `.sequences=...` - `.sequences=...`
A set of sequences to generate configurations for in the context A set of sequences to generate configurations for in the context
of the current category of the current category
...@@ -130,6 +129,9 @@ configuration option in the form `$key: $value` ...@@ -130,6 +129,9 @@ configuration option in the form `$key: $value`
(optional) an ordered list of category-sequence-specific options (optional) an ordered list of category-sequence-specific options
for decoder.cfg for decoder.cfg
- `.pcerrorflags=[].$cfgOption`
(optional) an ordered list of category-sequence-specific options
for pcerror.cfg
## Merging rules ## Merging rules
...@@ -139,4 +141,4 @@ Multiple YAML config spec files are recursively merged as follows: ...@@ -139,4 +141,4 @@ Multiple YAML config spec files are recursively merged as follows:
- src:scalar → dst:scalar ⇒ replaced - src:scalar → dst:scalar ⇒ replaced
- src:hash → dst:hash ⇒ recursive merge of key-value pairs - src:hash → dst:hash ⇒ recursive merge of key-value pairs
- src:list → dst:scalar ⇒ assign [src, dst] to dst, removing unique values - src:list → dst:scalar ⇒ assign [src, dst] to dst, removing unique values
- src:list → dst:list ⇒ assign [src, dst] to dst, removing unique values - src:list → dst:list ⇒ assign [src, dst] to dst, removing unique values
\ No newline at end of file
...@@ -255,6 +255,9 @@ sub genSeqVariants { ...@@ -255,6 +255,9 @@ sub genSeqVariants {
# pcerror configuration # pcerror configuration
my @pcerrorflags = ( my @pcerrorflags = (
params_from_node($seq->{pcerrorflags}), params_from_node($seq->{pcerrorflags}),
params_from_node($cat->{pcerrorflags}),
params_from_node($cat_seq->{pcerrorflags}, $var),
params_from_node($cat_seq->{$var}{pcerrorflags}),
); );
# evaluate any value expressions # evaluate any value expressions
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment