Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[ci]fix deprecated set-output from Python #58064

Closed
wants to merge 4 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 8 additions & 2 deletions .ci/ctest2ci.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
# - Colors for failing unit tests and test cases
# - Group control sequences to hide uninteresting output by default

import os
import sys
import re
import subprocess
Expand All @@ -37,6 +38,11 @@
printable = set(string.printable)


def set_output(name, value):
with open(os.environ['GITHUB_OUTPUT'], 'a') as fh:
print(f'{name}={value}', file=fh)


def start_fold(tag):
sys.stdout.write('::group::{}\n'.format(tag))
fold_stack.append(tag)
Expand Down Expand Up @@ -111,7 +117,7 @@ def start_test_fold():

if not in_failing_test and re.search('[0-9]+% tests passed, [0-9]+ tests failed out of', updated_line):
tests_failing = re.match(r'.* ([0-9]+) tests failed', updated_line).group(1)
updated_line += '\n::set-output name=TESTS_FAILING::{}'.format(tests_failing)
set_output('TESTS_FAILING', tests_failing)
end_fold()

if re.search('100% tests passed', updated_line):
Expand All @@ -121,7 +127,7 @@ def start_test_fold():
start_fold('submit')
elif re.search('Test results submitted to', updated_line):
cdash_url = re.match(r'.*(http.*)$', updated_line).group(1)
updated_line += '\n::set-output name=CDASH_URL::{}'.format(cdash_url)
set_output('CDASH_URL', cdash_url)
end_fold()

sys.stdout.write(updated_line)
Expand Down
2 changes: 1 addition & 1 deletion tests/src/core/testqgscurve.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ void TestQgsCurve::curveToLine()

/* op: Maximum of 10 units of difference, symmetric */
TEST_C2L( circularString, 10, QgsAbstractGeometry::MaximumDifference,
"LineString (0 0, 29.29 70.71, 100 100, 170.71 70.71, 200 0)", 2 );
"LineString (1 0, 29.29 70.71, 100 100, 170.71 70.71, 200 0)", 2 );

/* op: Maximum of 300 units (higher than sagitta) of difference, symmetric */
/* See https://github.com/qgis/QGIS/issues/31832 */
Expand Down
Loading