• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

Python tests.TEST_MAP类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Python中workspace_tools.tests.TEST_MAP的典型用法代码示例。如果您正苦于以下问题:Python TEST_MAP类的具体用法?Python TEST_MAP怎么用?Python TEST_MAP使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



在下文中一共展示了TEST_MAP类的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Python代码示例。

示例1: set

    build_report = {}
    build_properties = {}

    platforms = None
    if options.platforms != "":
        platforms = set(options.platforms.split(","))

    if options.build_tests:
        # Get all paths
        directories = options.build_tests.split(',')
        for i in range(len(directories)):
            directories[i] = normpath(join(TEST_DIR, directories[i]))

        test_names = []

        for test_id in TEST_MAP.keys():
            # Prevents tests with multiple source dirs from being checked
            if isinstance( TEST_MAP[test_id].source_dir, basestring):
                test_path = normpath(TEST_MAP[test_id].source_dir)
                for directory in directories:
                    if directory in test_path:
                        test_names.append(test_id)

        mut_counter = 1
        mut = {}
        test_spec = {
            "targets": {}
        }

        for target_name, toolchain_list in OFFICIAL_MBED_LIBRARY_BUILD:
            toolchains = None
开发者ID:dessel,项目名称:mbed,代码行数:31,代码来源:build_release.py


示例2: sorted

                      default=False, help="List available tests in order and exit")

    # Ideally, all the tests with a single "main" thread can be run with, or
    # without the rtos
    parser.add_option("--rtos", action="store_true", dest="rtos",
                      default=False, help="Link to the rtos")

    # Specify a different linker script
    parser.add_option("-l", "--linker", dest="linker_script",
                      default=None, help="use the specified linker script")

    (options, args) = parser.parse_args()

    # Print available tests in order and exit
    if options.list_tests is True:
        print '\n'.join(map(str, sorted(TEST_MAP.values())))
        sys.exit()

    # force program to "0" if a source dir is specified
    if options.source_dir is not None:
        p = 0
        n = None
    else:
    # Program Number or name
        p, n = options.program, options.program_name

    if n is not None and p is not None:
        args_error(parser, "[ERROR] specify either '-n' or '-p', not both")
    if n:
        if not n in TEST_MAP.keys():
            # Check if there is an alias for this in private_settings.py
开发者ID:AsamQi,项目名称:mbed,代码行数:31,代码来源:make.py


示例3: build_mbed_libs

            # print '=== %s::%s ===' % (target, toolchain)
            # Let's build our test
            if target not in TARGET_MAP:
                print 'Skipped tests for %s target. Target platform not found' % (target)
                continue

            T = TARGET_MAP[target]
            build_mbed_libs_options = ["analyze"] if opts.goanna_for_mbed_sdk else None
            build_mbed_libs_result = build_mbed_libs(T, toolchain, options=build_mbed_libs_options)
            if not build_mbed_libs_result:
                print 'Skipped tests for %s target. Toolchain %s is not yet supported for this target' % (T.name, toolchain)
                continue

            build_dir = join(BUILD_DIR, "test", target, toolchain)

            for test_id, test in TEST_MAP.iteritems():
                if opts.test_by_names and test_id not in opts.test_by_names.split(','):
                    continue

                if test_ids and test_id not in test_ids:
                    continue

                if opts.test_only_peripheral and not test.peripherals:
                    if opts.verbose_skipped_tests:
                        print "TargetTest::%s::NotPeripheralTestSkipped()" % (target)
                    continue

                if opts.test_only_common and test.peripherals:
                    if opts.verbose_skipped_tests:
                        print "TargetTest::%s::PeripheralTestSkipped()" % (target)
                    continue
开发者ID:NordicSemiconductor,项目名称:mbed,代码行数:31,代码来源:singletest.py


示例4: or

                   default=None, help="The mbed serial port")
 parser.add_option("-b", "--baud", type="int", dest="baud",
                   default=None, help="The mbed serial baud rate")
 
 # Ideally, all the tests with a single "main" thread can be run with, or
 # without the rtos
 parser.add_option("--rtos", action="store_true", dest="rtos",
                   default=False, help="Link to the rtos")
 
 (options, args) = parser.parse_args()
 
 # Program Number
 p = options.program
 if p is None or (p < 0) or (p > (len(TESTS)-1)):
     message = "[ERROR] You have to specify one of the following tests:\n"
     descriptions = [(test.n, test.description) for test in TEST_MAP.values()]
     descriptions.sort()
     message += '\n'.join(["  [%2d] %s " % d for d in descriptions])
     args_error(parser, message)
 
 # Target
 if options.mcu is None :
     args_error(parser, "[ERROR] You should specify an MCU")
 mcu = options.mcu
 
 # Toolchain
 if options.tool is None:
     args_error(parser, "[ERROR] You should specify a TOOLCHAIN")
 toolchain = options.tool
 
 # Test
开发者ID:3eggert,项目名称:mbed,代码行数:31,代码来源:make.py


示例5: build_mbed_libs

            # Let's build our test
            if target not in TARGET_MAP:
                print 'Skipped tests for %s target. Target platform not found' % (target)
                continue

            T = TARGET_MAP[target]
            build_mbed_libs_options = ["analyze"] if opts.goanna_for_mbed_sdk else None
            build_mbed_libs_result = build_mbed_libs(T, toolchain, options=build_mbed_libs_options)
            if not build_mbed_libs_result:
                print 'Skipped tests for %s target. Toolchain %s is not yet supported for this target' % (T.name, toolchain)
                continue

            build_dir = join(BUILD_DIR, "test", target, toolchain)

            # Enumerate through all tests
            test_map_keys = TEST_MAP.keys()
            if opts.shuffle_test_order:
                random.shuffle(test_map_keys)

            for test_id in test_map_keys:
                test = TEST_MAP[test_id]
                if opts.test_by_names and test_id not in opts.test_by_names.split(','):
                    continue

                if test_ids and test_id not in test_ids:
                    continue

                if opts.test_only_peripheral and not test.peripherals:
                    if opts.verbose_skipped_tests:
                        print "TargetTest::%s::NotPeripheralTestSkipped()" % (target)
                    continue
开发者ID:nikosun,项目名称:mbed,代码行数:31,代码来源:singletest.py


示例6: sorted

    parser.add_option("--testlib",
                      action="store_true",
                      dest="testlib",
                      default=False,
                      help="Link with mbed test library")

    # Specify a different linker script
    parser.add_option("-l", "--linker", dest="linker_script",
                      default=None, help="use the specified linker script")

    (options, args) = parser.parse_args()

    # Print available tests in order and exit
    if options.list_tests is True:
        print '\n'.join(map(str, sorted(TEST_MAP.values())))
        sys.exit()

    # force program to "0" if a source dir is specified
    if options.source_dir is not None:
        p = 0
        n = None
    else:
    # Program Number or name
        p, n = options.program, options.program_name

    if n is not None and p is not None:
        args_error(parser, "[ERROR] specify either '-n' or '-p', not both")
    if n:
        # We will transform 'n' to list of 'p' (integers which are test numbers)
        nlist = n.split(',')
开发者ID:1deus,项目名称:tmk_keyboard,代码行数:30,代码来源:make.py


示例7: args_error

 (options, args) = parser.parse_args()
 
 # Target
 if options.mcu is None :
     args_error(parser, "[ERROR] You should specify an MCU")
 mcu = options.mcu
 
 # IDE
 if options.ide is None:
     args_error(parser, "[ERROR] You should specify an IDE")
 ide = options.ide
 
 # Project
 if options.program is None or (options.program < 0) or (options.program > (len(TESTS)-1)):
     message = "[ERROR] You have to specify one of the following tests:\n"
     message += '\n'.join(map(str, sorted(TEST_MAP.values())))
     args_error(parser, message)
 test = Test(options.program)
 
 if not options.build:
     # Substitute the library builds with the sources
     # TODO: Substitute also the other library build paths
     if MBED_LIBRARIES in test.dependencies:
         test.dependencies.remove(MBED_LIBRARIES)
         test.dependencies.append(MBED_BASE)
 
 # Build the projectwith the same directory structure of the mbed online IDE
 project_dir = join(EXPORT_WORKSPACE, test.id)
 setup_user_prj(project_dir, test.source_dir, test.dependencies)
 
 # Export to selected toolchain 
开发者ID:SibghatullahSheikh,项目名称:mbed,代码行数:31,代码来源:project.py


示例8: args_error

    (options, args) = parser.parse_args()

    # Target
    if options.mcu is None:
        args_error(parser, "[ERROR] You should specify an MCU")
    mcu = options.mcu

    # IDE
    if options.ide is None:
        args_error(parser, "[ERROR] You should specify an IDE")
    ide = options.ide

    # Project
    if options.program is None or (options.program < 0) or (options.program > (len(TESTS) - 1)):
        message = "[ERROR] You have to specify one of the following tests:\n"
        message += "\n".join(map(str, sorted(TEST_MAP.values())))
        args_error(parser, message)
    test = Test(options.program)

    if not options.build:
        # Substitute the library builds with the sources
        # TODO: Substitute also the other library build paths
        if MBED_LIBRARIES in test.dependencies:
            test.dependencies.remove(MBED_LIBRARIES)
            test.dependencies.append(MBED_BASE)

    # Build the projectwith the same directory structure of the mbed online IDE
    project_dir = join(EXPORT_WORKSPACE, test.id)
    setup_user_prj(project_dir, test.source_dir, test.dependencies)

    # Export to selected toolchain
开发者ID:Joey-Ye,项目名称:mbed,代码行数:31,代码来源:project.py



注:本文中的workspace_tools.tests.TEST_MAP类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Python utils.mkdir函数代码示例发布时间:2022-05-26
下一篇:
Python libraries.Library类代码示例发布时间:2022-05-26
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap