* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-08-26 15:13 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-08-26 15:13 UTC (permalink / raw
To: gentoo-commits
commit: 8824df689066c24214322f8f13f39d56105bea7f
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 26 15:12:47 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 15:12:47 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8824df68
Add __test__ for repoman tests.
---
0 files changed, 0 insertions(+), 0 deletions(-)
diff --git a/pym/portage/tests/repoman/__test__ b/pym/portage/tests/repoman/__test__
new file mode 100644
index 0000000..e69de29
^ permalink raw reply [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-08-26 16:52 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-08-26 16:52 UTC (permalink / raw
To: gentoo-commits
commit: 1dc7ac4b48ca0a5a8b607bbadf759fa209b49e9c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Aug 26 16:52:04 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Aug 26 16:52:04 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1dc7ac4b
Fix EPREFIX/EROOT typo in repoman test.
---
pym/portage/tests/repoman/test_simple.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index b987f29..b156789 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -107,7 +107,7 @@ class SimpleRepomanTestCase(TestCase):
playground = ResolverPlayground(ebuilds=ebuilds)
settings = playground.settings
- eprefix = settings["EROOT"]
+ eprefix = settings["EPREFIX"]
distdir = os.path.join(eprefix, "distdir")
portdir = settings["PORTDIR"]
profiles_dir = os.path.join(portdir, "profiles")
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-09-14 18:40 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-09-14 18:40 UTC (permalink / raw
To: gentoo-commits
commit: f6ccf1ef3886bebbc07b9c177819887abdc9f303
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Sep 14 18:40:06 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Sep 14 18:40:06 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f6ccf1ef
repoman: test symlinked repo path
---
pym/portage/tests/repoman/test_simple.py | 7 ++++++-
1 files changed, 6 insertions(+), 1 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 27e7d0e..7717f36 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -93,6 +93,7 @@ class SimpleRepomanTestCase(TestCase):
playground = ResolverPlayground(ebuilds=ebuilds)
settings = playground.settings
eprefix = settings["EPREFIX"]
+ eroot = settings["EROOT"]
distdir = os.path.join(eprefix, "distdir")
portdir = settings["PORTDIR"]
profiles_dir = os.path.join(portdir, "profiles")
@@ -139,11 +140,15 @@ class SimpleRepomanTestCase(TestCase):
for cp, xml_data in metadata_xml_files:
with open(os.path.join(portdir, cp, "metadata.xml"), 'w') as f:
f.write(playground.metadata_xml_template % xml_data)
+ # Use a symlink to portdir, in order to trigger bugs
+ # involving cannonical vs. non-canonical paths.
+ portdir_symlink = os.path.join(eroot, "portdir_symlink")
+ os.symlink(portdir, portdir_symlink)
# repoman checks metadata.dtd for recent CTIME, so copy the file in
# order to ensure that the CTIME is current
shutil.copyfile(metadata_dtd, os.path.join(distdir, "metadata.dtd"))
for cwd in ("", "dev-libs", "dev-libs/A", "dev-libs/B"):
- abs_cwd = os.path.join(portdir, cwd)
+ abs_cwd = os.path.join(portdir_symlink, cwd)
proc = subprocess.Popen([portage._python_interpreter, "-Wd",
os.path.join(PORTAGE_BIN_PATH, "repoman"), "full"],
cwd=abs_cwd, env=env, stdout=subprocess.PIPE)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-10-17 2:34 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-10-17 2:34 UTC (permalink / raw
To: gentoo-commits
commit: 0d9a52d90144614f813811e59107a75daa888a0a
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 02:34:19 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 02:34:19 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0d9a52d9
tests/repoman: test commit with git
These tests only run if the git binary is found. They include testing
of new --echangelog=y option.
---
pym/portage/tests/repoman/test_simple.py | 95 ++++++++++++++++++++++++++----
1 files changed, 84 insertions(+), 11 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index ec27a09..825f356 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -29,6 +29,7 @@ class SimpleRepomanTestCase(TestCase):
return "python is missing xml support"
def testSimple(self):
+ debug = False
skip_reason = self._must_skip()
if skip_reason:
@@ -52,7 +53,7 @@ class SimpleRepomanTestCase(TestCase):
"EAPI" : "4",
"HOMEPAGE" : "http://example.com",
"IUSE" : "flag",
- "KEYWORDS": "x86",
+ "KEYWORDS": "~x86",
"LICENSE": "GPL-2",
"RDEPEND": "flag? ( dev-libs/B[flag] )",
},
@@ -62,7 +63,7 @@ class SimpleRepomanTestCase(TestCase):
"EAPI" : "4",
"HOMEPAGE" : "http://example.com",
"IUSE" : "flag",
- "KEYWORDS": "x86",
+ "KEYWORDS": "~x86",
"LICENSE": "GPL-2",
},
}
@@ -90,15 +91,51 @@ class SimpleRepomanTestCase(TestCase):
("flag", "Description of how USE='flag' affects packages"),
)
- playground = ResolverPlayground(ebuilds=ebuilds)
+ playground = ResolverPlayground(ebuilds=ebuilds, debug=debug)
settings = playground.settings
eprefix = settings["EPREFIX"]
eroot = settings["EROOT"]
+ portdb = playground.trees[playground.root]["porttree"].dbapi
+ homedir = os.path.join(eroot, "home")
distdir = os.path.join(eprefix, "distdir")
portdir = settings["PORTDIR"]
profiles_dir = os.path.join(portdir, "profiles")
license_dir = os.path.join(portdir, "licenses")
+ repoman_cmd = (portage._python_interpreter, "-Wd",
+ os.path.join(PORTAGE_BIN_PATH, "repoman"))
+
+ git_binary = find_binary("git")
+ git_cmd = (git_binary,)
+
+ cp_binary = find_binary("cp")
+ self.assertEqual(cp_binary is None, False,
+ "cp command not found")
+ cp_cmd = (cp_binary,)
+
+ test_ebuild = portdb.findname("dev-libs/A-1")
+ self.assertFalse(test_ebuild is None)
+
+ committer_name = "Gentoo Dev"
+ committer_email = "gentoo-dev@gentoo.org"
+
+ git_test = (
+ ("", git_cmd + ("config", "--global", "user.name", committer_name,)),
+ ("", git_cmd + ("config", "--global", "user.email", committer_email,)),
+ ("", git_cmd + ("init-db",)),
+ ("", git_cmd + ("add", ".")),
+ ("", git_cmd + ("commit", "-a", "-m", "add whole repo")),
+ ("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "2.ebuild")),
+ ("", git_cmd + ("add", test_ebuild[:-8] + "2.ebuild")),
+ ("", repoman_cmd + ("commit", "--echangelog=y", "-m", "bump to version 2")),
+ ("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "3.ebuild")),
+ ("", git_cmd + ("add", test_ebuild[:-8] + "3.ebuild")),
+ ("dev-libs", repoman_cmd + ("commit", "--echangelog=y", "-m", "bump to version 3")),
+ ("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "4.ebuild")),
+ ("", git_cmd + ("add", test_ebuild[:-8] + "4.ebuild")),
+ ("dev-libs/A", repoman_cmd + ("commit", "--echangelog=y", "-m", "bump to version 4")),
+ )
+
pythonpath = os.environ.get("PYTHONPATH")
if pythonpath is not None and not pythonpath.strip():
pythonpath = None
@@ -115,6 +152,9 @@ class SimpleRepomanTestCase(TestCase):
env = {
"__REPOMAN_TEST_EPREFIX" : eprefix,
"DISTDIR" : distdir,
+ "GENTOO_COMMITTER_NAME" : committer_name,
+ "GENTOO_COMMITTER_EMAIL" : committer_email,
+ "HOME" : homedir,
"PATH" : os.environ["PATH"],
"PORTAGE_GRPNAME" : os.environ["PORTAGE_GRPNAME"],
"PORTAGE_USERNAME" : os.environ["PORTAGE_USERNAME"],
@@ -122,7 +162,7 @@ class SimpleRepomanTestCase(TestCase):
"PYTHONPATH" : pythonpath,
}
- dirs = [license_dir, profiles_dir, distdir]
+ dirs = [homedir, license_dir, profiles_dir, distdir]
try:
for d in dirs:
ensure_dirs(d)
@@ -147,19 +187,52 @@ class SimpleRepomanTestCase(TestCase):
# repoman checks metadata.dtd for recent CTIME, so copy the file in
# order to ensure that the CTIME is current
shutil.copyfile(metadata_dtd, os.path.join(distdir, "metadata.dtd"))
+
+ if debug:
+ # The subprocess inherits both stdout and stderr, for
+ # debugging purposes.
+ stdout = None
+ else:
+ # The subprocess inherits stderr so that any warnings
+ # triggered by python -Wd will be visible.
+ stdout = subprocess.PIPE
+
for cwd in ("", "dev-libs", "dev-libs/A", "dev-libs/B"):
abs_cwd = os.path.join(portdir_symlink, cwd)
proc = subprocess.Popen([portage._python_interpreter, "-Wd",
os.path.join(PORTAGE_BIN_PATH, "repoman"), "full"],
- cwd=abs_cwd, env=env, stdout=subprocess.PIPE)
- output = proc.stdout.readlines()
- proc.wait()
- proc.stdout.close()
- if proc.returncode != os.EX_OK:
- for line in output:
- sys.stderr.write(_unicode_decode(line))
+ cwd=abs_cwd, env=env, stdout=stdout)
+
+ if debug:
+ proc.wait()
+ else:
+ output = proc.stdout.readlines()
+ proc.wait()
+ proc.stdout.close()
+ if proc.returncode != os.EX_OK:
+ for line in output:
+ sys.stderr.write(_unicode_decode(line))
self.assertEqual(os.EX_OK, proc.returncode,
"repoman failed in %s" % (cwd,))
+
+ if git_binary is not None:
+ for cwd, cmd in git_test:
+ abs_cwd = os.path.join(portdir_symlink, cwd)
+ proc = subprocess.Popen(cmd,
+ cwd=abs_cwd, env=env, stdout=stdout)
+
+ if debug:
+ proc.wait()
+ else:
+ output = proc.stdout.readlines()
+ proc.wait()
+ proc.stdout.close()
+ if proc.returncode != os.EX_OK:
+ for line in output:
+ sys.stderr.write(_unicode_decode(line))
+
+ self.assertEqual(os.EX_OK, proc.returncode,
+ "%s failed in %s" % (cmd, cwd,))
finally:
playground.cleanup()
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-10-17 5:44 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-10-17 5:44 UTC (permalink / raw
To: gentoo-commits
commit: 9641a783dffbe551ced3a27d34363d937906197d
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Mon Oct 17 05:44:08 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Mon Oct 17 05:44:08 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=9641a783
tests/repoman: fix manifests before adding to git
---
pym/portage/tests/repoman/test_simple.py | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 825f356..534f091 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -123,6 +123,7 @@ class SimpleRepomanTestCase(TestCase):
("", git_cmd + ("config", "--global", "user.name", committer_name,)),
("", git_cmd + ("config", "--global", "user.email", committer_email,)),
("", git_cmd + ("init-db",)),
+ ("", repoman_cmd + ("manifest",)),
("", git_cmd + ("add", ".")),
("", git_cmd + ("commit", "-a", "-m", "add whole repo")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "2.ebuild")),
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-10-18 5:37 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-10-18 5:37 UTC (permalink / raw
To: gentoo-commits
commit: be67c3eac359d9e661db3b4f0310002e1dd39931
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Oct 18 05:37:11 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Oct 18 05:37:11 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=be67c3ea
tests/repoman: fix 'unknown revision' git msgs
---
pym/portage/tests/repoman/test_simple.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 534f091..172c22d 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -120,10 +120,10 @@ class SimpleRepomanTestCase(TestCase):
committer_email = "gentoo-dev@gentoo.org"
git_test = (
+ ("", repoman_cmd + ("manifest",)),
("", git_cmd + ("config", "--global", "user.name", committer_name,)),
("", git_cmd + ("config", "--global", "user.email", committer_email,)),
("", git_cmd + ("init-db",)),
- ("", repoman_cmd + ("manifest",)),
("", git_cmd + ("add", ".")),
("", git_cmd + ("commit", "-a", "-m", "add whole repo")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "2.ebuild")),
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-10-20 20:10 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-10-20 20:10 UTC (permalink / raw
To: gentoo-commits
commit: 68414e9ffe4c05a0a0e81734b80db61e2782937c
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 20 20:09:11 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 20 20:09:11 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=68414e9f
tests/repoman: use layout.conf update-changelog
---
pym/portage/tests/repoman/test_simple.py | 18 ++++++++++++++----
1 files changed, 14 insertions(+), 4 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 172c22d..68681b3 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -42,6 +42,15 @@ class SimpleRepomanTestCase(TestCase):
# $Header: $
""" % time.gmtime().tm_year
+ repo_configs = {
+ "test_repo": {
+ "layout.conf":
+ (
+ "update-changelog = true",
+ ),
+ }
+ }
+
profiles = (
("x86", "default/linux/x86/test_profile", "stable"),
)
@@ -91,7 +100,8 @@ class SimpleRepomanTestCase(TestCase):
("flag", "Description of how USE='flag' affects packages"),
)
- playground = ResolverPlayground(ebuilds=ebuilds, debug=debug)
+ playground = ResolverPlayground(ebuilds=ebuilds,
+ repo_configs=repo_configs, debug=debug)
settings = playground.settings
eprefix = settings["EPREFIX"]
eroot = settings["EROOT"]
@@ -128,13 +138,13 @@ class SimpleRepomanTestCase(TestCase):
("", git_cmd + ("commit", "-a", "-m", "add whole repo")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "2.ebuild")),
("", git_cmd + ("add", test_ebuild[:-8] + "2.ebuild")),
- ("", repoman_cmd + ("commit", "--echangelog=y", "-m", "bump to version 2")),
+ ("", repoman_cmd + ("commit", "-m", "bump to version 2")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "3.ebuild")),
("", git_cmd + ("add", test_ebuild[:-8] + "3.ebuild")),
- ("dev-libs", repoman_cmd + ("commit", "--echangelog=y", "-m", "bump to version 3")),
+ ("dev-libs", repoman_cmd + ("commit", "-m", "bump to version 3")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "4.ebuild")),
("", git_cmd + ("add", test_ebuild[:-8] + "4.ebuild")),
- ("dev-libs/A", repoman_cmd + ("commit", "--echangelog=y", "-m", "bump to version 4")),
+ ("dev-libs/A", repoman_cmd + ("commit", "-m", "bump to version 4")),
)
pythonpath = os.environ.get("PYTHONPATH")
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2011-10-20 21:18 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2011-10-20 21:18 UTC (permalink / raw
To: gentoo-commits
commit: 0a1cbfd526662b0d60ed8dd89127d1b869e3ec6a
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Thu Oct 20 21:18:34 2011 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Thu Oct 20 21:18:34 2011 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=0a1cbfd5
tests/repoman: add skel.ChangeLog
---
pym/portage/tests/repoman/test_simple.py | 2 ++
1 files changed, 2 insertions(+), 0 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 68681b3..83de883 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -177,6 +177,8 @@ class SimpleRepomanTestCase(TestCase):
try:
for d in dirs:
ensure_dirs(d)
+ with open(os.path.join(portdir, "skel.ChangeLog"), 'w') as f:
+ f.write(copyright_header)
with open(os.path.join(profiles_dir, "profiles.desc"), 'w') as f:
for x in profiles:
f.write("%s %s %s\n" % x)
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2012-06-13 17:45 Arfrever Frehtes Taifersar Arahesis
0 siblings, 0 replies; 12+ messages in thread
From: Arfrever Frehtes Taifersar Arahesis @ 2012-06-13 17:45 UTC (permalink / raw
To: gentoo-commits
commit: 811236c327fa58ca2b8f643fd641ff89d2437115
Author: Arfrever Frehtes Taifersar Arahesis <Arfrever <AT> Apache <DOT> Org>
AuthorDate: Wed Jun 13 17:44:44 2012 +0000
Commit: Arfrever Frehtes Taifersar Arahesis <arfrever.fta <AT> gmail <DOT> com>
CommitDate: Wed Jun 13 17:44:44 2012 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=811236c3
Fix test failure with Python 2.6.
---
pym/portage/tests/repoman/test_echangelog.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
diff --git a/pym/portage/tests/repoman/test_echangelog.py b/pym/portage/tests/repoman/test_echangelog.py
index 74aa1c5..502aa72 100644
--- a/pym/portage/tests/repoman/test_echangelog.py
+++ b/pym/portage/tests/repoman/test_echangelog.py
@@ -61,7 +61,7 @@ class RepomanEchangelogTestCase(TestCase):
# Test missing ChangeLog, but with empty skel (i.e. do nothing).
UpdateChangeLog(self.pkgdir, self.user, 'test!', '/does/not/exist', self.cat, self.pkg, quiet=True)
actual_cl = self._readlines(self.changelog)
- self.assertGreater(len(actual_cl[0]), 0)
+ self.assertTrue(len(actual_cl[0]) > 0)
def testEmptyChangeLog(self):
# Make sure we do the right thing with a 0-byte ChangeLog
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2013-01-01 4:57 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2013-01-01 4:57 UTC (permalink / raw
To: gentoo-commits
commit: 1e5a09e99d8677f20f74d662da4e1f5c127650a7
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jan 1 04:57:07 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jan 1 04:57:07 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=1e5a09e9
test_echangelog: sync year with UpdateChangeLog
The code has to be in sync in order to prevent erroneous test failures
triggered by new year's day timezone differences.
---
pym/portage/tests/repoman/test_echangelog.py | 6 +-----
1 files changed, 1 insertions(+), 5 deletions(-)
diff --git a/pym/portage/tests/repoman/test_echangelog.py b/pym/portage/tests/repoman/test_echangelog.py
index 502aa72..1640be2 100644
--- a/pym/portage/tests/repoman/test_echangelog.py
+++ b/pym/portage/tests/repoman/test_echangelog.py
@@ -1,13 +1,9 @@
# Copyright 2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-import datetime
-import subprocess
-import sys
import tempfile
import time
-import portage
from portage import os
from portage import shutil
from portage.tests import TestCase
@@ -35,7 +31,7 @@ class RepomanEchangelogTestCase(TestCase):
self.header_pkg = '# ChangeLog for %s/%s\n' % (self.cat, self.pkg)
self.header_copyright = '# Copyright 1999-%s Gentoo Foundation; Distributed under the GPL v2\n' % \
- datetime.datetime.now().year
+ time.strftime('%Y', time.gmtime())
self.header_cvs = '# $Header: $\n'
self.changelog = os.path.join(self.pkgdir, 'ChangeLog')
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2013-01-19 23:39 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2013-01-19 23:39 UTC (permalink / raw
To: gentoo-commits
commit: 8f0d30e96a69c689577f8eb43b160d134d1f30f2
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Sat Jan 19 23:39:15 2013 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jan 19 23:39:15 2013 +0000
URL: http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=8f0d30e9
tests/repoman: add dev and exp profiles
---
pym/portage/tests/repoman/test_simple.py | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index 908fb2d..420297c 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -76,6 +76,8 @@ class SimpleRepomanTestCase(TestCase):
profiles = (
("x86", "default/linux/x86/test_profile", "stable"),
+ ("x86", "default/linux/x86/test_dev", "dev"),
+ ("x86", "default/linux/x86/test_exp", "exp"),
)
profile = {
@@ -192,6 +194,7 @@ class SimpleRepomanTestCase(TestCase):
("", git_cmd + ("init-db",)),
("", git_cmd + ("add", ".")),
("", git_cmd + ("commit", "-a", "-m", "add whole repo")),
+ ("", repoman_cmd + ("full", "-d")),
("", cp_cmd + (test_ebuild, test_ebuild[:-8] + "2.ebuild")),
("", git_cmd + ("add", test_ebuild[:-8] + "2.ebuild")),
("", repoman_cmd + ("commit", "-m", "bump to version 2")),
@@ -242,6 +245,18 @@ class SimpleRepomanTestCase(TestCase):
with open(os.path.join(profiles_dir, "profiles.desc"), 'w') as f:
for x in profiles:
f.write("%s %s %s\n" % x)
+
+ # ResolverPlayground only created the first profile,
+ # so create the remaining ones.
+ for x in profiles[1:]:
+ sub_profile_dir = os.path.join(profiles_dir, x[1])
+ ensure_dirs(sub_profile_dir)
+ for config_file, lines in profile.items():
+ file_name = os.path.join(sub_profile_dir, config_file)
+ with open(file_name, "w") as f:
+ for line in lines:
+ f.write("%s\n" % line)
+
for x in licenses:
open(os.path.join(license_dir, x), 'wb').close()
with open(os.path.join(profiles_dir, "arch.list"), 'w') as f:
^ permalink raw reply related [flat|nested] 12+ messages in thread
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/
@ 2016-02-24 23:19 Zac Medico
0 siblings, 0 replies; 12+ messages in thread
From: Zac Medico @ 2016-02-24 23:19 UTC (permalink / raw
To: gentoo-commits
commit: 4d7792fc2d633011b158780d670e57212961f933
Author: Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 24 23:17:45 2016 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Feb 24 23:19:33 2016 +0000
URL: https://gitweb.gentoo.org/proj/portage.git/commit/?id=4d7792fc
SimpleRepomanTestCase: suppress metadata.dtd fetch (fix travis-ci failure)
pym/portage/tests/repoman/test_simple.py | 9 +++------
1 file changed, 3 insertions(+), 6 deletions(-)
diff --git a/pym/portage/tests/repoman/test_simple.py b/pym/portage/tests/repoman/test_simple.py
index af6f95d..98220c4 100644
--- a/pym/portage/tests/repoman/test_simple.py
+++ b/pym/portage/tests/repoman/test_simple.py
@@ -7,7 +7,6 @@ import time
import portage
from portage import os
-from portage import shutil
from portage import _unicode_decode
from portage.const import PORTAGE_BASE_PATH, PORTAGE_PYM_PATH
from portage.process import find_binary
@@ -273,11 +272,9 @@ class SimpleRepomanTestCase(TestCase):
# involving canonical vs. non-canonical paths.
test_repo_symlink = os.path.join(eroot, "test_repo_symlink")
os.symlink(test_repo_location, test_repo_symlink)
- # repoman checks metadata.dtd for recent CTIME, so copy the file in
- # order to ensure that the CTIME is current
- # NOTE: if we don't have the file around, let repoman try to fetch it.
- if os.path.exists(metadata_dtd):
- shutil.copyfile(metadata_dtd, os.path.join(distdir, "metadata.dtd"))
+ metadata_dtd_dest = os.path.join(test_repo_location, 'metadata/dtd/metadata.dtd')
+ os.makedirs(os.path.dirname(metadata_dtd_dest))
+ os.symlink(metadata_dtd, metadata_dtd_dest)
if debug:
# The subprocess inherits both stdout and stderr, for
^ permalink raw reply related [flat|nested] 12+ messages in thread
end of thread, other threads:[~2016-02-24 23:19 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-10-17 2:34 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/repoman/ Zac Medico
-- strict thread matches above, loose matches on Subject: below --
2016-02-24 23:19 Zac Medico
2013-01-19 23:39 Zac Medico
2013-01-01 4:57 Zac Medico
2012-06-13 17:45 Arfrever Frehtes Taifersar Arahesis
2011-10-20 21:18 Zac Medico
2011-10-20 20:10 Zac Medico
2011-10-18 5:37 Zac Medico
2011-10-17 5:44 Zac Medico
2011-09-14 18:40 Zac Medico
2011-08-26 16:52 Zac Medico
2011-08-26 15:13 Zac Medico
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox