diff options
author | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-09-27 11:34:26 +0300 |
---|---|---|
committer | Markus Lehtonen <markus.lehtonen@linux.intel.com> | 2013-12-12 16:35:52 +0200 |
commit | 7f42aa998e63f434b7879e846ff847c4dea6dc14 (patch) | |
tree | f4aa8870296c7b1adc9cb5e06f87f685b28c562c | |
parent | 5b9902aebdee511f2162c1eca1970c9732b1e578 (diff) |
Move RepoManifest to gbp
Signed-off-by: Markus Lehtonen <markus.lehtonen@linux.intel.com>
-rwxr-xr-x | bootstrap.py | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/bootstrap.py b/bootstrap.py index 71db04e..5e42d7d 100755 --- a/bootstrap.py +++ b/bootstrap.py @@ -28,7 +28,8 @@ import shutil import subprocess import sys import tempfile -from xml.dom import minidom + +from tests.component.rpm import RepoManifest LOG = logging.getLogger(os.path.basename(sys.argv[0])) TEST_PKGS = {'gbp-test-native': {'build_branches': ['master']}, @@ -135,28 +136,6 @@ def build_test_pkg(pkg_name, branch, outdir, silent_build=False): shutil.rmtree(builddir) -class RepoManifest(object): - """Class representing a test repo manifest file""" - def __init__(self): - self._doc = minidom.Document() - self._doc.appendChild(self._doc.createElement("gbp-test-manifest")) - - def add_project(self, name, branches): - """Add new project to the manifest""" - prj_e = self._doc.createElement('project') - prj_e.setAttribute('name', name) - for branch, revision in branches.iteritems(): - br_e = self._doc.createElement('branch') - br_e.setAttribute('name', branch) - br_e.setAttribute('revision', revision) - prj_e.appendChild(br_e) - self._doc.firstChild.appendChild(prj_e) - - def write(self, filename): - """Write to file""" - with open(filename, 'w') as fileobj: - fileobj.write(self._doc.toprettyxml()) - def update_testrepo_manifest(manifest, pkg_name, branches): """ Update a manifest file describing the branches/sha1s of a test git repo |