Skip to content
Snippets Groups Projects
  • Martyn Welch's avatar
    8e0c0e45
    Separate out test case generation from deployment · 8e0c0e45
    Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
    
    Rather than looping over branches (in included template from `pages`),
    generate the test cases here, provide these as an artifact and deploy
    in a separate job. This avoids the regeneration of pages that have
    not changed.
    
    Use the apertis-test-cases-web as part of a multi-project pipeline to
    deploy. Remove the deployment tools from this branch.
    
    Whilst we are here, utilise an environment variable for the release to
    make it easier to migrate this between releases.
    
    Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
    8e0c0e45
    History
    Separate out test case generation from deployment
    Martyn Welch authored and Emanuele Aina's avatar Emanuele Aina committed
    
    Rather than looping over branches (in included template from `pages`),
    generate the test cases here, provide these as an artifact and deploy
    in a separate job. This avoids the regeneration of pages that have
    not changed.
    
    Use the apertis-test-cases-web as part of a multi-project pipeline to
    deploy. Remove the deployment tools from this branch.
    
    Whilst we are here, utilise an environment variable for the release to
    make it easier to migrate this between releases.
    
    Signed-off-by: default avatarMartyn Welch <martyn.welch@collabora.com>
atc 1.68 KiB
#!/usr/bin/env python3
###################################################################################
# Main program to render test case files.
# Create a HTML page from a YAML test case file.
#
# Copyright (C) 2018
# Luis Araujo <luis.araujo@collabora.co.uk>
#
# This library is free software; you can redistribute it and/or
# modify it under the terms of the GNU Lesser General Public
# License as published by the Free Software Foundation; either
# version 2.1 of the License, or (at your option) any later version.

# This library is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
# Lesser General Public License for more details.

# You should have received a copy of the GNU Lesser General Public
# License along with this library; if not, write to the Free Software
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  US
###################################################################################

from atc_renderer import main
from argparse import ArgumentParser

if '__main__' == __name__:
    cli_parser = ArgumentParser(description="atc (Test Cases Renderer)")
    cli_parser.add_argument('-i', '--index-page', action='store_true',
                            help="Create index page")
    cli_parser.add_argument('-d', '--test-case-dir',
                            help="Directory path for generated test cases")
    cli_parser.add_argument('yaml_files',
                            help="YAML file or files directory")
    args = cli_parser.parse_args()

    main(args.yaml_files, args.test_case_dir, args.index_page)

    exit(0)