[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[gnurl] 232/411: CI/tests: use verification curl for test reporting APIs
From: |
gnunet |
Subject: |
[gnurl] 232/411: CI/tests: use verification curl for test reporting APIs |
Date: |
Wed, 13 Jan 2021 01:20:47 +0100 |
This is an automated email from the git hooks/post-receive script.
nikita pushed a commit to branch master
in repository gnurl.
commit 0a99281c214794cf013297075b49e29bde1de566
Author: Marc Hoersken <info@marc-hoersken.de>
AuthorDate: Mon Oct 12 06:52:40 2020 +0200
CI/tests: use verification curl for test reporting APIs
Avoid using our own, potentially installed, curl for
the test reporting APIs in case it is broken.
Reviewed-by: Daniel Stenberg
Preparation for #6049
Closes #6063
---
tests/appveyor.pm | 10 +++++-----
tests/azure.pm | 15 ++++++++-------
tests/runtests.pl | 12 ++++++------
3 files changed, 19 insertions(+), 18 deletions(-)
diff --git a/tests/appveyor.pm b/tests/appveyor.pm
index 64b2ab3ba..1b3889dc0 100644
--- a/tests/appveyor.pm
+++ b/tests/appveyor.pm
@@ -34,12 +34,12 @@ sub appveyor_check_environment {
}
sub appveyor_create_test_result {
- my ($testnum, $testname)=@_;
+ my ($curl, $testnum, $testname)=@_;
$testname =~ s/\\/\\\\/g;
$testname =~ s/\'/\\\'/g;
$testname =~ s/\"/\\\"/g;
my $appveyor_baseurl="$ENV{'APPVEYOR_API_URL'}";
- my $appveyor_result=`curl --silent --noproxy "*" \\
+ my $appveyor_result=`$curl --silent --noproxy "*" \\
--header "Content-Type: application/json" \\
--data "
{
@@ -55,7 +55,7 @@ sub appveyor_create_test_result {
}
sub appveyor_update_test_result {
- my ($testnum, $error, $start, $stop)=@_;
+ my ($curl, $testnum, $error, $start, $stop)=@_;
my $testname=$APPVEYOR_TEST_NAMES{$testnum};
if(!defined $testname) {
return;
@@ -83,7 +83,7 @@ sub appveyor_update_test_result {
$appveyor_category = 'Error';
}
my $appveyor_baseurl="$ENV{'APPVEYOR_API_URL'}";
- my $appveyor_result=`curl --silent --noproxy "*" --request PUT \\
+ my $appveyor_result=`$curl --silent --noproxy "*" --request PUT \\
--header "Content-Type: application/json" \\
--data "
{
@@ -98,7 +98,7 @@ sub appveyor_update_test_result {
"$appveyor_baseurl/api/tests"`;
print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
if($appveyor_category eq 'Error') {
- $appveyor_result=`curl --silent --noproxy "*" \\
+ $appveyor_result=`$curl --silent --noproxy "*" \\
--header "Content-Type: application/json" \\
--data "
{
diff --git a/tests/azure.pm b/tests/azure.pm
index ffcd165f2..98d777ba6 100644
--- a/tests/azure.pm
+++ b/tests/azure.pm
@@ -37,8 +37,9 @@ sub azure_check_environment {
}
sub azure_create_test_run {
+ my ($curl)=@_;
my
$azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
- my $azure_run=`curl --silent --noproxy "*" \\
+ my $azure_run=`$curl --silent --noproxy "*" \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
@@ -56,13 +57,13 @@ sub azure_create_test_run {
}
sub azure_create_test_result {
- my ($azure_run_id, $testnum, $testname)=@_;
+ my ($curl, $azure_run_id, $testnum, $testname)=@_;
$testname =~ s/\\/\\\\/g;
$testname =~ s/\'/\\\'/g;
$testname =~ s/\"/\\\"/g;
my $title_testnum=sprintf("%04d", $testnum);
my
$azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
- my $azure_result=`curl --silent --noproxy "*" \\
+ my $azure_result=`$curl --silent --noproxy "*" \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
@@ -85,7 +86,7 @@ sub azure_create_test_result {
}
sub azure_update_test_result {
- my ($azure_run_id, $azure_result_id, $testnum, $error, $start, $stop)=@_;
+ my ($curl, $azure_run_id, $azure_result_id, $testnum, $error, $start,
$stop)=@_;
if(!defined $stop) {
$stop = $start;
}
@@ -106,7 +107,7 @@ sub azure_update_test_result {
$azure_outcome = 'Failed';
}
my
$azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
- my $azure_result=`curl --silent --noproxy "*" --request PATCH \\
+ my $azure_result=`$curl --silent --noproxy "*" --request PATCH \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
@@ -128,9 +129,9 @@ sub azure_update_test_result {
}
sub azure_update_test_run {
- my ($azure_run_id)=@_;
+ my ($curl, $azure_run_id)=@_;
my
$azure_baseurl="$ENV{'SYSTEM_TEAMFOUNDATIONCOLLECTIONURI'}$ENV{'SYSTEM_TEAMPROJECTID'}";
- my $azure_run=`curl --silent --noproxy "*" --request PATCH \\
+ my $azure_run=`$curl --silent --noproxy "*" --request PATCH \\
--header "Authorization: Bearer $ENV{'AZURE_ACCESS_TOKEN'}" \\
--header "Content-Type: application/json" \\
--data "
diff --git a/tests/runtests.pl b/tests/runtests.pl
index 6fd5d52f5..cc66f31cf 100755
--- a/tests/runtests.pl
+++ b/tests/runtests.pl
@@ -3520,10 +3520,10 @@ sub singletest {
# create test result in CI services
if(azure_check_environment() && $AZURE_RUN_ID) {
- $AZURE_RESULT_ID = azure_create_test_result($AZURE_RUN_ID, $testnum,
$testname);
+ $AZURE_RESULT_ID = azure_create_test_result($VCURL, $AZURE_RUN_ID,
$testnum, $testname);
}
elsif(appveyor_check_environment()) {
- appveyor_create_test_result($testnum, $testname);
+ appveyor_create_test_result($VCURL, $testnum, $testname);
}
# remove test server commands file before servers are started/verified
@@ -5683,7 +5683,7 @@ sub displaylogs {
#
if(azure_check_environment()) {
- $AZURE_RUN_ID = azure_create_test_run();
+ $AZURE_RUN_ID = azure_create_test_run($VCURL);
logmsg "Azure Run ID: $AZURE_RUN_ID\n" if ($verbose);
}
@@ -5711,11 +5711,11 @@ foreach $testnum (@at) {
# update test result in CI services
if(azure_check_environment() && $AZURE_RUN_ID && $AZURE_RESULT_ID) {
- $AZURE_RESULT_ID = azure_update_test_result($AZURE_RUN_ID,
$AZURE_RESULT_ID, $testnum, $error,
+ $AZURE_RESULT_ID = azure_update_test_result($VCURL, $AZURE_RUN_ID,
$AZURE_RESULT_ID, $testnum, $error,
$timeprepini{$testnum},
$timevrfyend{$testnum});
}
elsif(appveyor_check_environment()) {
- appveyor_update_test_result($testnum, $error, $timeprepini{$testnum},
$timevrfyend{$testnum});
+ appveyor_update_test_result($VCURL, $testnum, $error,
$timeprepini{$testnum}, $timevrfyend{$testnum});
}
if($error < 0) {
@@ -5760,7 +5760,7 @@ my $sofar = time() - $start;
#
if(azure_check_environment() && $AZURE_RUN_ID) {
- $AZURE_RUN_ID = azure_update_test_run($AZURE_RUN_ID);
+ $AZURE_RUN_ID = azure_update_test_run($VCURL, $AZURE_RUN_ID);
}
# Tests done, stop the servers
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
- [gnurl] 140/411: tests/FILEFORMAT: document nonewline support for <file>, (continued)
- [gnurl] 140/411: tests/FILEFORMAT: document nonewline support for <file>, gnunet, 2021/01/12
- [gnurl] 153/411: github: remove the duplicate "Security vulnerability" entry, gnunet, 2021/01/12
- [gnurl] 158/411: RELEASE-NOTES: synced, gnunet, 2021/01/12
- [gnurl] 183/411: Curl_send: return error when pre_receive_plain can't malloc, gnunet, 2021/01/12
- [gnurl] 162/411: docs/TheArtOfHttpScripting: convert to markdown, gnunet, 2021/01/12
- [gnurl] 149/411: multi: reuse WinSock events variable in Curl_multi_wait, gnunet, 2021/01/12
- [gnurl] 148/411: TODO: dynamically decide to use socketpair, gnunet, 2021/01/12
- [gnurl] 139/411: tool_writeout: add new writeout variable, %{num_headers}, gnunet, 2021/01/12
- [gnurl] 182/411: ftp: separate FTPS from FTP over "HTTPS proxy", gnunet, 2021/01/12
- [gnurl] 197/411: configure: use "no" instead of "disabled" for the end summary, gnunet, 2021/01/12
- [gnurl] 232/411: CI/tests: use verification curl for test reporting APIs,
gnunet <=
- [gnurl] 233/411: strerror: Revert to local codepage for Windows error string, gnunet, 2021/01/12
- [gnurl] 226/411: mbedtls: add missing header when defining MBEDTLS_DEBUG, gnunet, 2021/01/12
- [gnurl] 159/411: CHECKSRC: document two missing warnings, gnunet, 2021/01/12
- [gnurl] 133/411: curl: make file2memory use dynbuf, gnunet, 2021/01/12
- [gnurl] 154/411: man pages: switch to https://example.com URLs, gnunet, 2021/01/12
- [gnurl] 259/411: packages/OS400: make the source code-style compliant, gnunet, 2021/01/12
- [gnurl] 241/411: src/tool_filetime: disable -Wformat on mingw for this file, gnunet, 2021/01/12
- [gnurl] 132/411: curl: make file2string use dynbuf, gnunet, 2021/01/12
- [gnurl] 180/411: pingpong: use a dynbuf for the *_pp_sendf() function, gnunet, 2021/01/12
- [gnurl] 143/411: test3015: verify stdout "as text", gnunet, 2021/01/12