def build_differing_cfg_list(self):
        """ Return a list of configurations that all differ. """
        cfg_list = []
        def_cfg = gccxml_configuration_t(
            "gccxml_path", '.', ['tmp'], ['sym'], ['unsym'], None, False, "")
        cfg_list.append(def_cfg)

        # Test changes that should cause sig changes
        gccxml_changed = def_cfg.clone()
        gccxml_changed.gccxml_path = "other_path"
        cfg_list.append(gccxml_changed)

        wd_changed = def_cfg.clone()
        wd_changed.working_directory = "other_dir"
        cfg_list.append(wd_changed)

        # inc_changed = def_cfg.clone()
        # inc_changed.include_paths = ["/var/tmp"]
        # self.assert_(configuration_signature(inc_changed) != def_sig)
        inc_changed = gccxml_configuration_t(
            "gccxml_path", '.', ['/var/tmp'], ['sym'], ['unsym'],
            None, False, "")
        cfg_list.append(inc_changed)

        # def_changed = def_cfg.clone()
        # def_changed.define_symbols = ["symbol"]
        # self.assert_(configuration_signature(def_changed) != def_sig)
        def_changed = gccxml_configuration_t(
            "gccxml_path", '.', ['/var/tmp'], ['new-sym'], ['unsym'],
            None, False, "")
        cfg_list.append(def_changed)

        # undef_changed = def_cfg.clone()
        # undef_changed.undefine_symbols = ["symbol"]
        # self.assert_(configuration_signature(undef_changed) != def_sig)
        undef_changed = gccxml_configuration_t(
            "gccxml_path", '.', ['/var/tmp'], ['sym'], ['new-unsym'],
            None, False, "")
        cfg_list.append(undef_changed)

        cflags_changed = def_cfg.clone()
        cflags_changed.cflags = "new flags"
        cfg_list.append(cflags_changed)

        return cfg_list
예제 #2
0
def read_gccxml(*args):
    path = os.path.join(*args)
    from pygccxml.parser.config import gccxml_configuration_t
    from pygccxml.parser.source_reader import source_reader_t
    return source_reader_t(gccxml_configuration_t()).read_xml_file(path)[0]
예제 #3
0
def read_gccxml(*args):
    path = os.path.join(*args)
    from pygccxml.parser.config import gccxml_configuration_t
    from pygccxml.parser.source_reader import source_reader_t
    return source_reader_t(gccxml_configuration_t()).read_xml_file(path)[0]