common/tools/ats/ats3_testdrop.pl
changeset 139 7f5b4e3699cb
parent 134 039d0b7e56f3
equal deleted inserted replaced
138:d3c5dd0ae0b0 139:7f5b4e3699cb
   101 # Compose URL to notify server of test drop, requesting run.
   101 # Compose URL to notify server of test drop, requesting run.
   102 my $url ="http://$host/ats3/XTestRunExecute.do?username=$username&password=$password&testrunpath=$host_test_drop";
   102 my $url ="http://$host/ats3/XTestRunExecute.do?username=$username&password=$password&testrunpath=$host_test_drop";
   103 $url .= "&schedule=$schedule", if (defined($schedule));
   103 $url .= "&schedule=$schedule", if (defined($schedule));
   104 # Post URL to server with cURL.
   104 # Post URL to server with cURL.
   105 my $curl_cmd = "curl \"$url\"";
   105 my $curl_cmd = "curl \"$url\"";
   106 my $curl_response = `$curl_cmd 2>$1`;
   106 my $curl_response = `$curl_cmd 2>&1`;
   107 die("\nTest drop failed: $!\n"), if ($?);
   107 die("\nTest drop failed: $!\n"), if ($?);
   108 if ($curl_response =~ /(TEST_RUN_REF_ID=\d+)/) {
   108 if ($curl_response =~ /(TEST_RUN_REF_ID=\d+)/) {
   109     #extract test run id from cURL response.
   109     #extract test run id from cURL response.
   110     print "$1\n";
   110     print "$1\n";
   111 }
   111 }