|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH v2 1/6] osstest: allow appending to existing runvars
From: Ian Jackson <ian.jackson@xxxxxxxxxx>
So that the contents of the runvar can be expanded. There are
currently two ways to do this:
- Using += will append to the end of the runvar.
- Using ,= will append to the end of the runvar using ',' as the
separator.
Note that if the runvar is empty {,|+}= just sets the runvar.
Signed-off-by: Ian Jackson <ian.jackson@xxxxxxxxxx>
---
cs-job-create | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/cs-job-create b/cs-job-create
index 064a9294..1980a625 100755
--- a/cs-job-create
+++ b/cs-job-create
@@ -53,8 +53,12 @@ foreach my $rv (@runvars) {
$suppress{$1}= 1;
next;
}
- $rv =~ m/^([a-z][0-9a-z_]*)(\~?)\=(.*)$/ or die "$rv ?";
- my ($name,$synth,$val) = ($1,$2,$3);
+ $rv =~ m/^([a-z][0-9a-z_]*)(\~?)([+,]?)\=(.*)$/ or die "$rv ?";
+ my ($name,$synth,$add,$val) = ($1,$2,$3,$4);
+ if ($add && $runvars{$name}) {
+ die "$name synth mismatch" if !!$runvars{$name}[1] ne !!$synth;
+ $val = $runvars{$name}[0].($add ne '+' && $add).$val;
+ }
$runvars{$name}= [$val,$synth];
}
--
2.17.1
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxxx
https://lists.xenproject.org/mailman/listinfo/xen-devel
|
![]() |
Lists.xenproject.org is hosted with RackSpace, monitoring our |