Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
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
Exemplo n.º 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'
Exemplo n.º 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'