# HG changeset patch # User Maciej Seroka # Date 1260460265 0 # Node ID b24df46a3102f09788c287816fa4d27e1d66d5a1 # Parent 2a9e6403efaf2ab5e2e5e689b762f3617eeeee4f Implemented exporting Smoke Test Report to Diamonds diff -r 2a9e6403efaf -r b24df46a3102 common/diamonds/linksForDiamonds.xml.ftl --- a/common/diamonds/linksForDiamonds.xml.ftl Wed Dec 09 15:55:13 2009 +0000 +++ b/common/diamonds/linksForDiamonds.xml.ftl Thu Dec 10 15:51:05 2009 +0000 @@ -22,19 +22,24 @@ Build Logs file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\build_logs.zip - <#if "${ant['sf.spec.bccheck.enable']}" = "true" && "${ant['sf.spec.bccheck.enable.ha']}" = "true"> - + + log + Smoke Test Report + file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\ats_reports\ATS3Report.html + + <#if "${ant['sf.spec.bccheck.enable']}" = "true" && "${ant['sf.spec.bccheck.enable.ha']}" = "true"> + log Binary Compatibility Report (Headerfiles) - file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\BC\headers_report.xml - - - <#if "${ant['sf.spec.bccheck.enable']}" = "true" && "${ant['sf.spec.bccheck.enable.la']}" = "true"> - + file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\BC\headers_report.xml + + + <#if "${ant['sf.spec.bccheck.enable']}" = "true" && "${ant['sf.spec.bccheck.enable.la']}" = "true"> + log Binary Compatibility Report (Libraries) - file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\BC\libraries_report.xml - - + file:///${ant['sf.spec.publish.networkdrive']}\${ant['sf.spec.job.name']}\builds\${ant['sf.spec.job.codeline']}\${ant['build.id']}\BC\libraries_report.xml + + \ No newline at end of file diff -r 2a9e6403efaf -r b24df46a3102 common/tools/ats/ats_specialise_test_drop.pl --- a/common/tools/ats/ats_specialise_test_drop.pl Wed Dec 09 15:55:13 2009 +0000 +++ b/common/tools/ats/ats_specialise_test_drop.pl Thu Dec 10 15:51:05 2009 +0000 @@ -62,6 +62,10 @@ 'publish=s') or usage_error(); +# Check if Tie::File module installed +eval("use Tie::File"); +if ($@) { $publish = '' }; + if ($help) { help(); } @@ -127,7 +131,7 @@ $test_drop->{'test'}->{'buildid'}->[0] = $build_id, if $build_id; # Insert the FileStoreAction parameter my $postaction_params = $test_drop->{'test'}->{'postAction'}->[0]->{'params'}->{'param'}, if $publish; -$postaction_params->[1] = { 'name' => "to-folder", 'value' => $publish . "\\ats_reports" }, if $publish; +$postaction_params->[1] = { 'name' => "to-folder", 'value' => $publish }, if $publish; if ($host_name) { # Also insert specified host name my $devices = $test_drop->{'test'}->{'target'}->[0]->{'device'}; @@ -152,6 +156,21 @@ open OUT,">test.xml" or die("Cannot open file \"test.xml\" for writing. $!\n"); print OUT XMLout($test_drop, keeproot => 1); close OUT; + if ($publish) { #Move FileStoreAction above + my @lines; + tie @lines, 'Tie::File', "test.xml" or die("Cannot tie file \"test.xml\". $!\n"); + my $current_line = 0; + for (@lines) { + if (/FileStoreAction/) { + my $line_to_move = @lines[$current_line]; + splice @lines, $current_line, 1; + splice @lines, $current_line-4, 0, $line_to_move; + last; + } + $current_line++; + } + untie @lines; + } if ( -f "$destfile.zip") { unlink("$destfile.zip") or die("Could not delete \"$destfile.zip\": $!\n"); }