copied from preCICE tutorials
This commit is contained in:
parent
46a7e98752
commit
3f1b1a6d0f
68 changed files with 156449 additions and 0 deletions
29
preCICE_tools/tests/print_test_suites.py
Normal file
29
preCICE_tools/tests/print_test_suites.py
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
from metadata_parser.metdata import Tutorials
|
||||
from systemtests.TestSuite import TestSuites
|
||||
from paths import PRECICE_TESTS_DIR, PRECICE_TUTORIAL_DIR
|
||||
|
||||
|
||||
import argparse
|
||||
import logging
|
||||
|
||||
|
||||
def main():
|
||||
parser = argparse.ArgumentParser(description='Prints available Test Suites')
|
||||
parser.add_argument('--log-level', choices=['DEBUG', 'INFO', 'WARNING', 'ERROR', 'CRITICAL'],
|
||||
default='INFO', help='Set the logging level')
|
||||
args = parser.parse_args()
|
||||
|
||||
# Configure logging based on the provided log level
|
||||
logging.basicConfig(level=args.log_level, format='%(levelname)s: %(message)s')
|
||||
|
||||
print(f"Using log-level: {args.log_level}")
|
||||
|
||||
available_tutorials = Tutorials.from_path(PRECICE_TUTORIAL_DIR)
|
||||
available_testsuites = TestSuites.from_yaml(
|
||||
PRECICE_TESTS_DIR / "tests.yaml", available_tutorials)
|
||||
|
||||
print(available_testsuites)
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
main()
|
||||
Loading…
Add table
Add a link
Reference in a new issue