summaryrefslogtreecommitdiff
path: root/tests/appveyor.pm
diff options
context:
space:
mode:
authorMarc Hoersken <info@marc-hoersken.de>2020-03-06 21:41:06 +0100
committerMarc Hoersken <info@marc-hoersken.de>2020-04-05 17:33:07 +0200
commit4ba6ba2d941c621c80a3b84a8db7da7253f8a86d (patch)
treefc49fe8b5720a459064e8c6713903fbfd672405f /tests/appveyor.pm
parent49b652dacca7355aae6a8a8a8fc77d85660e58de (diff)
downloadcurl-4ba6ba2d941c621c80a3b84a8db7da7253f8a86d.tar.gz
appveyor: show failed tests in log even if test is ignored
And print API response with newline only if there is one
Diffstat (limited to 'tests/appveyor.pm')
-rw-r--r--tests/appveyor.pm13
1 files changed, 7 insertions, 6 deletions
diff --git a/tests/appveyor.pm b/tests/appveyor.pm
index 4906d2c8c..64b2ab3ba 100644
--- a/tests/appveyor.pm
+++ b/tests/appveyor.pm
@@ -50,7 +50,7 @@ sub appveyor_create_test_result {
}
" \\
"$appveyor_baseurl/api/tests"`;
- print $appveyor_result;
+ print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
$APPVEYOR_TEST_NAMES{$testnum}=$testname;
}
@@ -68,7 +68,7 @@ sub appveyor_update_test_result {
my $appveyor_category;
if($error == 2) {
$appveyor_outcome = 'Ignored';
- $appveyor_category = 'Warning';
+ $appveyor_category = 'Error';
}
elsif($error < 0) {
$appveyor_outcome = 'NotRunnable';
@@ -91,23 +91,24 @@ sub appveyor_update_test_result {
'testFramework': 'runtests.pl',
'fileName': 'tests/data/test$testnum',
'outcome': '$appveyor_outcome',
- 'durationMilliseconds': $appveyor_duration
+ 'durationMilliseconds': $appveyor_duration,
+ 'ErrorMessage': 'Test $testnum $appveyor_outcome'
}
" \\
"$appveyor_baseurl/api/tests"`;
- print $appveyor_result;
+ print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
if($appveyor_category eq 'Error') {
$appveyor_result=`curl --silent --noproxy "*" \\
--header "Content-Type: application/json" \\
--data "
{
- 'message': '$testname $appveyor_outcome',
+ 'message': '$appveyor_outcome: $testname',
'category': '$appveyor_category',
'details': 'Test $testnum $appveyor_outcome'
}
" \\
"$appveyor_baseurl/api/build/messages"`;
- print $appveyor_result;
+ print "AppVeyor API result: $appveyor_result\n" if ($appveyor_result);
}
}