diff --git a/.ci/ctest2ci.py b/.ci/ctest2ci.py index f0722f7216c7..c1bc6fccdb21 100755 --- a/.ci/ctest2ci.py +++ b/.ci/ctest2ci.py @@ -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 @@ -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) @@ -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): @@ -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) diff --git a/tests/src/core/testqgscurve.cpp b/tests/src/core/testqgscurve.cpp index 07c0f492127d..c56abdaacce0 100644 --- a/tests/src/core/testqgscurve.cpp +++ b/tests/src/core/testqgscurve.cpp @@ -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 */