Support comma seperated list of machines
authorJonatan Schlag <jonatan.schlag@ipfire.org>
Mon, 23 Apr 2018 13:21:16 +0000 (15:21 +0200)
committerJonatan Schlag <jonatan.schlag@ipfire.org>
Mon, 23 Apr 2018 13:21:16 +0000 (15:21 +0200)
We now support something like:
alice,bob: echo

Be carefull:
alice, bob:
will break our parsing

Signed-off-by: Jonatan Schlag <jonatan.schlag@ipfire.org>
test.py

diff --git a/test.py b/test.py
index c755cbc..317d420 100755 (executable)
--- a/test.py
+++ b/test.py
@@ -489,7 +489,10 @@ class recipe():
             if machine == "include":
                 self._recipe.extend(recipe_to_include.recipe)
             else:
-                self._recipe.append((machine.strip(), extra.strip(), cmd.strip()))
+                # Support also something like 'alice,bob: echo'
+                machines = machine.split(",")
+                for machine in machines:
+                    self._recipe.append((machine.strip(), extra.strip(), cmd.strip()))
             i = i + 1
 
             if not self.in_recursion: