aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNikita Kozlovskiy <nikitka@gmail.com>2023-08-04 14:39:37 +0300
committernkozlovskiy <nmk@ydb.tech>2023-08-04 15:43:07 +0300
commit58b2b5f1b09bdcbdee63b662ce977728c3f4e0ed (patch)
treeee34e08401d1dba09fe6d891cf25680bf42f77fd
parent8da1cb6e4dcd6950755002e4f9341f41fd6ffb8f (diff)
downloadydb-58b2b5f1b09bdcbdee63b662ce977728c3f4e0ed.tar.gz
ci: change postprocess script run order
ci: change postprocess script run order Pull Request resolved: #318
-rw-r--r--.github/actions/test/action.yml32
-rwxr-xr-x.github/scripts/tests/attach-logs.py1
-rw-r--r--.github/scripts/tests/junit_utils.py7
-rw-r--r--.github/scripts/tests/mute_utils.py8
4 files changed, 29 insertions, 19 deletions
diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml
index 52115cc07c..edd14b5bb8 100644
--- a/.github/actions/test/action.yml
+++ b/.github/actions/test/action.yml
@@ -162,6 +162,22 @@ runs:
if: inputs.run_unit_tests == 'true'
shell: bash
run: |
+ echo "::group::extract-logs"
+
+ mkdir $ARTIFACTS_DIR/logs/
+
+ .github/scripts/tests/attach-logs.py \
+ --url-prefix ${{steps.init.outputs.logurlprefix}}/logs/ \
+ --filter-shard-file ${{steps.init.outputs.testshardfilterfile}} \
+ --filter-test-file ${{steps.init.outputs.testfilterfile}} \
+ --ctest-report $TESTREPDIR/suites/ctest_report.xml \
+ --junit-reports-path $TESTREPDIR/unittests/ \
+ --decompress \
+ $ARTIFACTS_DIR/${{steps.init.outputs.logfilename}} \
+ $ARTIFACTS_DIR/logs/
+
+ echo "::endgroup::"
+
echo "::group::junit-postprocess"
.github/scripts/tests/junit-postprocess.py \
@@ -180,22 +196,6 @@ runs:
echo "::endgroup::"
- echo "::group::extract-logs"
-
- mkdir $ARTIFACTS_DIR/logs/
-
- .github/scripts/tests/attach-logs.py \
- --url-prefix ${{steps.init.outputs.logurlprefix}}/logs/ \
- --filter-shard-file ${{steps.init.outputs.testshardfilterfile}} \
- --filter-test-file ${{steps.init.outputs.testfilterfile}} \
- --ctest-report $TESTREPDIR/suites/ctest_report.xml \
- --junit-reports-path $TESTREPDIR/unittests/ \
- --decompress \
- $ARTIFACTS_DIR/${{steps.init.outputs.logfilename}} \
- $ARTIFACTS_DIR/logs/
-
- echo "::endgroup::"
-
- name: write unittests summary
if: inputs.run_unit_tests == 'true'
shell: bash
diff --git a/.github/scripts/tests/attach-logs.py b/.github/scripts/tests/attach-logs.py
index 75ee224cc7..0f4a5bd785 100755
--- a/.github/scripts/tests/attach-logs.py
+++ b/.github/scripts/tests/attach-logs.py
@@ -120,6 +120,7 @@ def attach_to_unittests(ctest_log: CTestLog, unit_path):
continue
fn = f"_{shard}_not_found.xml"
+ print(f"create {fn}")
testcases = [create_error_testcase(t.shard.name, t.classname, t.method, t.fn, t.url) for t in extra_logs]
testsuite = create_error_testsuite(testcases)
diff --git a/.github/scripts/tests/junit_utils.py b/.github/scripts/tests/junit_utils.py
index 232aaafa6b..cca04b2521 100644
--- a/.github/scripts/tests/junit_utils.py
+++ b/.github/scripts/tests/junit_utils.py
@@ -34,8 +34,11 @@ def get_property_value(testcase, name):
def create_error_testsuite(testcases):
n = str(len(testcases))
- root = ET.Element("testsuite", dict(tests=n, failures=n))
- root.extend(testcases)
+ suite = ET.Element("testsuite", dict(tests=n, errors=n))
+ suite.extend(testcases)
+
+ root = ET.Element("testsuites", dict(tests=n, errors=n))
+ root.append(suite)
return ET.ElementTree(root)
diff --git a/.github/scripts/tests/mute_utils.py b/.github/scripts/tests/mute_utils.py
index 0d1af5a2f8..5d31137fab 100644
--- a/.github/scripts/tests/mute_utils.py
+++ b/.github/scripts/tests/mute_utils.py
@@ -60,7 +60,13 @@ def mute_target(node, node_name="failure"):
if failure is None:
return False
- skipped = ET.Element("skipped", {"message": failure.attrib["message"]})
+ msg = failure.get("message")
+
+ skipped = ET.Element("skipped")
+
+ if msg:
+ skipped.set('message', msg)
+
skipped.text = failure.text
node.remove(failure)