LEDS: Create LampTest group containing all the LEDs

LampTest currently expects all the LEDs to be blinking.

Fixes openbmc/openbmc#1288

Change-Id: Idf6728853612f6536e78f0f3c6555379e5b4e1b8
Signed-off-by: Vishwanatha Subbanna <vishwa@linux.vnet.ibm.com>
diff --git a/gen_led_groups.pl b/gen_led_groups.pl
index 2c5ca33..9b8922b 100755
--- a/gen_led_groups.pl
+++ b/gen_led_groups.pl
@@ -44,6 +44,9 @@
 # Its fine if they don't map to any physical LED
 my @defaultGroup = ("BmcBooted", "PowerOn");
 
+# This group contains all the LEDs with the action Blink
+my $lampTest = "LampTest";
+
 # API used to access parsed XML data
 my $targetObj = Targets->new;
 if($verbose == 1)
@@ -169,6 +172,11 @@
                 $hashGroup{$groupName}{$fru}{"Action"} = $action;
                 $hashGroup{$groupName}{$fru}{"Period"} = $period;
                 $hashGroup{$groupName}{$fru}{"DutyOn"} = $dutyCycle;
+
+                # Need to update the LampTest group.
+                $hashGroup{$lampTest}{$fru}{"Action"} = "'Blink'";
+                $hashGroup{$lampTest}{$fru}{"Period"} = 1000;
+                $hashGroup{$lampTest}{$fru}{"DutyOn"} = 50;
             }
         } # Walk CONTROL_GROUP
     } # Has LED target
@@ -236,9 +244,9 @@
             $ledCopy = '';
         }
 
-        foreach my $led (keys %{ $hashGroup{$group} })
+        foreach my $led (sort keys %{ $hashGroup{$group} })
         {
-            foreach my $property (keys %{ $hashGroup{$group}{$led}})
+            foreach my $property (sort keys %{ $hashGroup{$group}{$led}})
             {
                 if($group ne $groupCopy)
                 {