コード例 #1
0
ファイル: roscreatepkg.py プロジェクト: daju1-ros/ros
def get_templates():
    templates = {}
    templates['CMakeLists.txt'] = read_template('CMakeLists.tmpl')
    templates['manifest.xml'] = read_template('manifest.tmpl')
    templates['mainpage.dox'] = read_template('mainpage.tmpl')
    templates['Makefile'] = read_template('Makefile.tmpl')
    return templates
コード例 #2
0
ファイル: roscreatepkg.py プロジェクト: strawlab/ros
def get_templates():
    templates = {}
    templates['CMakeLists.txt'] = read_template('CMakeLists.tmpl')
    templates['manifest.xml'] = read_template('manifest.tmpl')
    templates['mainpage.dox'] = read_template('mainpage.tmpl')
    templates['Makefile'] = read_template('Makefile.tmpl')
    return templates
コード例 #3
0
ファイル: roscreatestack.py プロジェクト: daju1-ros/ros
def get_templates():
    """
    @return: mapping of file names to templates to instantiate
    @rtype: {str: str}
    """
    templates = {}
    templates['stack.xml'] = read_template('stack.tmpl')
    templates['CMakeLists.txt'] = read_template('CMakeLists.stack.tmpl')
    templates['Makefile'] = read_template('Makefile.stack.tmpl')
    return templates
コード例 #4
0
ファイル: roscreatestack.py プロジェクト: lubosz/rosstacks
def get_templates():
    """
    @return: mapping of file names to templates to instantiate
    @rtype: {str: str}
    """
    templates = {}
    templates['stack.xml'] = read_template('stack.tmpl')
    templates['CMakeLists.txt'] = read_template('CMakeLists.stack.tmpl')
    templates['Makefile'] = read_template('Makefile.stack.tmpl')
    return templates
コード例 #5
0
def test_read_template():
    from roscreate.core import read_template
    s = set()
    # this unit test will break if any of the templates get removed/renamed
    tests = ['Makefile.tmpl', 'stack.tmpl', 'mainpage.tmpl', 'CMakeLists.stack.tmpl']
    for f in tests:
        text = read_template(f)
        s.add(text)
    # simple assert to make sure we didn't read the same thing from each template
    assert len(s) == len(tests)

    # hardcode test against a known template
    text = read_template('Makefile.tmpl')
    assert text == 'include $(shell rospack find mk)/cmake.mk'
コード例 #6
0
def test_read_template():
    from roscreate.core import read_template
    s = set()
    # this unit test will break if any of the templates get removed/renamed
    tests = ['Makefile.tmpl', 'stack.tmpl', 'mainpage.tmpl', 'CMakeLists.stack.tmpl']
    for f in tests:
        text = read_template(f)
        s.add(text)
    # simple assert to make sure we didn't read the same thing from each template
    assert len(s) == len(tests)

    # hardcode test against a known template
    text = read_template('Makefile.tmpl')        
    assert text == 'include $(shell rospack find mk)/cmake.mk'