You've already forked mariadb-columnstore-engine
mirror of
https://github.com/mariadb-corporation/mariadb-columnstore-engine.git
synced 2025-08-08 14:22:09 +03:00
CI from develop + cmapi [develop-23.02] (#2863)
* MCOL-5496: Merge CMAPI code to engine repo. [add] cmapi code to engine * MCOL-5496: Fix CI adding CMAPI steps. [fix] deb packages deps commands [add] several additional local variables [fix] packages url [fix] smoke step [fix] mtr step [fix] regression step [add] cmapipython, cmapibuild, cmapitest and cmapilog steps [fix] dockerfile step [fix] build step to include cmapi package on repodata creating [fix] multi_node_mtr step [fix] pkg step [add] cmapi steps to pipelines [fix] cmapi/CMakeLists.txt to prevent cmake byte-compile .py files for rpm packages [add] setup-repo.sh file [fix] now use packages from the repos in tests steps * Adding color 2 build script * Build script and logging scripts from develop * Remove test 222 from full regression, it is missing in 23.02 regression set --------- Co-authored-by: mariadb-AlanMologorsky <alan.mologorsky@mariadb.com> Co-authored-by: mariadb-RomanNavrotskiy <roman.navrotskiy@mariadb.com>
This commit is contained in:
41
cmapi/run_tests.py
Normal file
41
cmapi/run_tests.py
Normal file
@@ -0,0 +1,41 @@
|
||||
import datetime
|
||||
import logging
|
||||
import sys
|
||||
import unittest
|
||||
from cmapi_server.logging_management import add_logging_level
|
||||
|
||||
|
||||
class DatedTextTestResult(unittest.TextTestResult):
|
||||
def startTest(self, test: unittest.case.TestCase):
|
||||
self.stream.write('\n')
|
||||
self.stream.write(
|
||||
datetime.datetime.now().strftime("[%Y-%m-%d %H:%M:%S]: ")
|
||||
)
|
||||
return super().startTest(test)
|
||||
|
||||
|
||||
def run_tests_from_package(p_name: str):
|
||||
logging.info(f'Starting tests from package {p_name}')
|
||||
loader = unittest.TestLoader()
|
||||
testsuite = loader.discover(
|
||||
pattern='test_*.py', start_dir=p_name, top_level_dir='./'
|
||||
)
|
||||
runner = unittest.runner.TextTestRunner(
|
||||
verbosity=3, failfast=True, resultclass=DatedTextTestResult
|
||||
)
|
||||
result = runner.run(testsuite)
|
||||
failed = False
|
||||
if not result.wasSuccessful():
|
||||
failed = True
|
||||
sys.exit(failed)
|
||||
logging.info(f'Finished tests from package {p_name}')
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
add_logging_level('TRACE', 5)
|
||||
logging.basicConfig(
|
||||
level=logging.DEBUG,
|
||||
format='%(asctime)s [%(levelname)s] (%(name)s) %(message)s'
|
||||
)
|
||||
run_tests_from_package('cmapi_server')
|
||||
run_tests_from_package('mcs_node_control')
|
Reference in New Issue
Block a user