mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-23 16:12:01 +00:00
Merge pull request #60947 from ClickHouse/ci_fix_unit_test_ci_issue
CI: fix stage config (unit test release issue)
This commit is contained in:
commit
94e6f1929a
@ -11,7 +11,7 @@ from ci_utils import WithIter
|
||||
from integration_test_images import IMAGES
|
||||
|
||||
|
||||
class CIStages:
|
||||
class CIStages(metaclass=WithIter):
|
||||
NA = "UNKNOWN"
|
||||
BUILDS_1 = "Builds_1"
|
||||
BUILDS_2 = "Builds_2"
|
||||
@ -547,9 +547,17 @@ class CIConfig:
|
||||
stage_type = CIStages.TESTS_2
|
||||
elif self.is_test_job(job_name):
|
||||
stage_type = CIStages.TESTS_1
|
||||
if job_name == JobNames.LIBFUZZER_TEST:
|
||||
# since fuzzers build in Builds_2, test must be in Tests_2
|
||||
stage_type = CIStages.TESTS_2
|
||||
if job_name in CI_CONFIG.test_configs:
|
||||
required_build = CI_CONFIG.test_configs[job_name].required_build
|
||||
assert required_build
|
||||
if required_build in CI_CONFIG.get_builds_for_report(
|
||||
JobNames.BUILD_CHECK
|
||||
):
|
||||
stage_type = CIStages.TESTS_1
|
||||
else:
|
||||
stage_type = CIStages.TESTS_2
|
||||
else:
|
||||
stage_type = CIStages.TESTS_1
|
||||
assert stage_type, f"BUG [{job_name}]"
|
||||
return stage_type
|
||||
|
||||
|
@ -1,7 +1,7 @@
|
||||
#!/usr/bin/env python3
|
||||
|
||||
import unittest
|
||||
from ci_config import JobNames, CI_CONFIG, Runners
|
||||
from ci_config import CIStages, JobNames, CI_CONFIG, Runners
|
||||
|
||||
|
||||
class TestCIConfig(unittest.TestCase):
|
||||
@ -10,3 +10,21 @@ class TestCIConfig(unittest.TestCase):
|
||||
for job in JobNames:
|
||||
runner = CI_CONFIG.get_runner_type(job)
|
||||
self.assertIn(runner, Runners)
|
||||
|
||||
def test_job_stage_config(self):
|
||||
"""check runner is provided w/o exception"""
|
||||
for job in JobNames:
|
||||
stage = CI_CONFIG.get_job_ci_stage(job)
|
||||
if job in [
|
||||
JobNames.STYLE_CHECK,
|
||||
JobNames.FAST_TEST,
|
||||
JobNames.JEPSEN_KEEPER,
|
||||
JobNames.BUILD_CHECK,
|
||||
JobNames.BUILD_CHECK_SPECIAL,
|
||||
]:
|
||||
assert (
|
||||
stage == CIStages.NA
|
||||
), "These jobs are not in CI stages, must be NA"
|
||||
else:
|
||||
assert stage != CIStages.NA, f"stage not found for [{job}]"
|
||||
self.assertIn(stage, CIStages)
|
||||
|
Loading…
Reference in New Issue
Block a user