Ejemplo n.º 1
0
                  f'{TestResults.failed} FAILED, {TestResults.skipped} SKIPPED'
    sdc_utils.log_info(summary_msg, separate=True)
    for test_name in TestResults.failed_examples:
        sdc_utils.log_info(f'FAILED: {test_name}')

    if TestResults.failed > 0:
        sdc_utils.log_info('Intel SDC examples FAILED', separate=True)
        exit(-1)
    sdc_utils.log_info('Intel SDC examples PASSED', separate=True)

    return


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('--python', default='3.7', choices=['3.6', '3.7', '3.8'],
                        help='Python version, default = 3.7')
    parser.add_argument('--channels', default=None, help='Default env channels')
    parser.add_argument('--sdc-channel', default=None, help='Intel SDC channel')

    args = parser.parse_args()

    sdc_utils = SDC_Build_Utilities(args.python, args.channels, args.sdc_channel)
    sdc_utils.log_info('Run Intel(R) SDC examples', separate=True)
    sdc_utils.log_info(sdc_utils.line_double)
    sdc_utils.create_environment()
    sdc_package = f'sdc={sdc_utils.get_sdc_version_from_channel()}'
    sdc_utils.install_conda_package([sdc_package])

    run_examples(sdc_utils)
Ejemplo n.º 2
0
            sdc_utils.log_info(f'{sdc_example} PASSED')

    summary_msg = f'SDC examples summary: {total} RUN, {passed} PASSED, {failed} FAILED, {skipped} SKIPPED'
    sdc_utils.log_info(summary_msg, separate=True)
    for failed_example in failed_examples:
        sdc_utils.log_info(f'FAILED: {failed_example}')

    if failed > 0:
        sdc_utils.log_info('Intel SDC examples FAILED', separate=True)
        exit(-1)
    sdc_utils.log_info('Intel SDC examples PASSED', separate=True)

    return


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('--python', default='3.7', choices=['3.6', '3.7', '3.8'],
                        help='Python version, default = 3.7')
    parser.add_argument('--sdc-channel', default=None, help='Intel SDC channel')

    args = parser.parse_args()

    sdc_utils = SDC_Build_Utilities(args.python, args.sdc_channel)
    sdc_utils.log_info('Run Intel(R) SDC examples', separate=True)
    sdc_utils.log_info(sdc_utils.line_double)
    sdc_utils.create_environment(['scipy'])
    sdc_utils.install_conda_package(['sdc'])

    run_examples(sdc_utils)
Ejemplo n.º 3
0
from pathlib import Path
from utilities import SDC_Build_Utilities


def check_sdc_installed(sdc_utils, sdc_package):
    cmd_output = sdc_utils.get_command_output('conda list sdc')
    pattern = sdc_package.replace('=', r'\s+')
    return re.search(pattern, cmd_output)


if __name__ == '__main__':
    parser = argparse.ArgumentParser()
    parser.add_argument('--python', default='3.7', choices=['3.6', '3.7', '3.8'],
                        help='Python version, default = 3.7')
    parser.add_argument('--channels', default=None, help='Default env channels')
    parser.add_argument('--sdc-channel', default=None, help='Intel SDC channel')

    args = parser.parse_args()

    sdc_utils = SDC_Build_Utilities(args.python, args.channels, args.sdc_channel)
    sdc_utils.log_info('Test Intel(R) SDC conda install', separate=True)
    sdc_utils.log_info(sdc_utils.line_double)
    sdc_utils.create_environment()
    sdc_package = f'sdc={sdc_utils.get_sdc_version_from_channel()}'

    # channels list is aligned with install instruction in README.rst
    install_channels = "-c intel/label/beta -c intel -c defaults -c conda-forge"
    sdc_utils.install_conda_package([sdc_package], channels=install_channels)

    assert check_sdc_installed(sdc_utils, sdc_package), "SDC package was not installed"