# HG changeset patch # User brendand # Date 1257176432 0 # Node ID 9837304abcc639651f462a9fba8a7194d2d1a3be # Parent eaa8962bb97966a916c8d873c7ca0e759e7cc75b host name is added for any number of devices diff -r eaa8962bb979 -r 9837304abcc6 common/tools/ats/ats_specialise_test_drop.pl --- a/common/tools/ats/ats_specialise_test_drop.pl Mon Nov 02 15:28:51 2009 +0000 +++ b/common/tools/ats/ats_specialise_test_drop.pl Mon Nov 02 15:40:32 2009 +0000 @@ -125,13 +125,15 @@ $test_drop->{'test'}->{'buildid'}->[0] = $build_id, if $build_id; if ($host_name) { # Also insert specified host name - - my $device_properties = $test_drop->{'test'}->{'target'}->[0]->{'device'}->[0]->{'property'}; - my $num_properties = @{$device_properties}; - $device_properties->[$num_properties]= { 'name' => "HOST", 'value' => "$host_name" }; - $test_drop->{'test'}->{'target'}->[0]->{'device'}->[0]->{'property'} = $device_properties; - #print Dumper($device_properties); - #exit(0); + my $devices = $test_drop->{'test'}->{'target'}->[0]->{'device'}; + + foreach my $device (@{$devices}) { + my $device_properties = $device->{'property'}; + my $num_properties = @{$device_properties}; + + $device_properties->[$num_properties] = { 'name' => "HOST", 'value' => "$host_name" }; + $device->{'property'} = $device_properties; + } } if ($srctype =~ /^\.xml$/i ) { # Input file was XML