public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/
@ 2011-10-10  2:29 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2011-10-10  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     f1aeebf2c45869fa4149dda9c57e4ac50c8c5a15
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 22:34:35 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 02:27:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=f1aeebf2

tests: setup default bin env more

We want the default testing env to match default portage env.

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 pym/portage/tests/bin/setup_env.py |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/bin/setup_env.py b/pym/portage/tests/bin/setup_env.py
index e07643d..3942718 100644
--- a/pym/portage/tests/bin/setup_env.py
+++ b/pym/portage/tests/bin/setup_env.py
@@ -37,6 +37,9 @@ def binTestsInit():
 	env["PATH"] = bindir + ":" + env["PATH"]
 	env["PORTAGE_BIN_PATH"] = bindir
 	env["PORTAGE_PYM_PATH"] = pymdir
+	env["PORTAGE_INST_UID"] = str(os.getuid())
+	env["PORTAGE_INST_GID"] = str(os.getgid())
+	env["DESTTREE"] = "/usr"
 	os.mkdir(env["D"])
 	os.mkdir(env["T"])
 	os.mkdir(env["S"])



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/
@ 2011-10-10  2:29 Mike Frysinger
  0 siblings, 0 replies; 6+ messages in thread
From: Mike Frysinger @ 2011-10-10  2:29 UTC (permalink / raw
  To: gentoo-commits

commit:     4311d7785a2595501dd07c9daa7d8051cee8de40
Author:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sun Oct  9 22:43:17 2011 +0000
Commit:     Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Mon Oct 10 02:27:58 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=4311d778

tests/dodir: check relative path by itself

Signed-off-by: Mike Frysinger <vapier <AT> gentoo.org>

---
 pym/portage/tests/bin/test_dodir.py |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/bin/test_dodir.py b/pym/portage/tests/bin/test_dodir.py
index f4eb9b2..5d40181 100644
--- a/pym/portage/tests/bin/test_dodir.py
+++ b/pym/portage/tests/bin/test_dodir.py
@@ -10,6 +10,8 @@ class DoDir(BinTestCase):
 		try:
 			dodir("usr /usr")
 			exists_in_D("/usr")
+			dodir("boot")
+			exists_in_D("/boot")
 			dodir("/var/lib/moocow")
 			exists_in_D("/var/lib/moocow")
 		finally:



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/
@ 2011-11-02  2:27 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-11-02  2:27 UTC (permalink / raw
  To: gentoo-commits

commit:     dc058a30e89aebd1309f41bdf653685c33c830ee
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Nov  2 02:26:56 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Nov  2 02:26:56 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=dc058a30

test_dodir: fix breakage from last commit

We have to set the EAPI for prefix code to work.

---
 pym/portage/tests/bin/setup_env.py |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/pym/portage/tests/bin/setup_env.py b/pym/portage/tests/bin/setup_env.py
index 3942718..f57a685 100644
--- a/pym/portage/tests/bin/setup_env.py
+++ b/pym/portage/tests/bin/setup_env.py
@@ -30,6 +30,7 @@ def binTestsInit():
 	global basedir, env
 	basedir = tempfile.mkdtemp()
 	env = os.environ.copy()
+	env["EAPI"] = "0"
 	env["D"] = os.path.join(basedir, "image")
 	env["T"] = os.path.join(basedir, "temp")
 	env["S"] = os.path.join(basedir, "workdir")



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/
@ 2011-12-09  4:58 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2011-12-09  4:58 UTC (permalink / raw
  To: gentoo-commits

commit:     12f18ab6ae8d732a39924536f585dc5ab7af8bbd
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Fri Dec  9 04:58:33 2011 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Fri Dec  9 04:58:54 2011 +0000
URL:        http://git.overlays.gentoo.org/gitweb/?p=proj/portage.git;a=commit;h=12f18ab6

tests/bin: sanitize env

This fixes interference from FEATURES=force-prefix in the env.

---
 pym/portage/tests/bin/setup_env.py |    6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/pym/portage/tests/bin/setup_env.py b/pym/portage/tests/bin/setup_env.py
index f57a685..1f8554e 100644
--- a/pym/portage/tests/bin/setup_env.py
+++ b/pym/portage/tests/bin/setup_env.py
@@ -1,5 +1,5 @@
 # setup_env.py -- Make sure bin subdir has sane env for testing
-# Copyright 2007-2010 Gentoo Foundation
+# Copyright 2007-2011 Gentoo Foundation
 # Distributed under the terms of the GNU General Public License v2
 
 import tempfile
@@ -29,13 +29,13 @@ def binTestsInit():
 	binTestsCleanup()
 	global basedir, env
 	basedir = tempfile.mkdtemp()
-	env = os.environ.copy()
+	env = {}
 	env["EAPI"] = "0"
 	env["D"] = os.path.join(basedir, "image")
 	env["T"] = os.path.join(basedir, "temp")
 	env["S"] = os.path.join(basedir, "workdir")
 	env["PF"] = "portage-tests-0.09-r1"
-	env["PATH"] = bindir + ":" + env["PATH"]
+	env["PATH"] = bindir + ":" + os.environ["PATH"]
 	env["PORTAGE_BIN_PATH"] = bindir
 	env["PORTAGE_PYM_PATH"] = pymdir
 	env["PORTAGE_INST_UID"] = str(os.getuid())



^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/
@ 2018-01-09 20:59 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2018-01-09 20:59 UTC (permalink / raw
  To: gentoo-commits

commit:     c040200175b33e637a4807278925e92cf61eb725
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Tue Jan  9 20:28:27 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jan  9 20:41:58 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=c0402001

testDoInsOption: fix timestamp comparison to work in travis

Use integer comparison in order to avoid failures like the
following:

AssertionError: 1515530127.479328 != 1515530127.479327

 pym/portage/tests/bin/test_doins.py | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/bin/test_doins.py b/pym/portage/tests/bin/test_doins.py
index 9b6c55d85..e3d5153b3 100644
--- a/pym/portage/tests/bin/test_doins.py
+++ b/pym/portage/tests/bin/test_doins.py
@@ -45,8 +45,9 @@ class DoIns(setup_env.BinTestCase):
 			st = os.lstat(env['D'] + '/test')
 			if stat.S_IMODE(st.st_mode) != 0o644:
 				raise tests.TestCase.failureException
-			if os.stat(os.path.join(env['S'], 'test')).st_mtime != st.st_mtime:
-				raise tests.TestCase.failureException
+			self.assertEqual(
+				os.stat(os.path.join(env['S'], 'test'))[stat.ST_MTIME],
+				st[stat.ST_MTIME])
 		finally:
 			self.cleanup()
 


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/
@ 2018-02-21 23:36 Zac Medico
  0 siblings, 0 replies; 6+ messages in thread
From: Zac Medico @ 2018-02-21 23:36 UTC (permalink / raw
  To: gentoo-commits

commit:     572861a1201ca67e18ce2ccae87480a2600b6ae2
Author:     Zac Medico <zmedico <AT> gentoo <DOT> org>
AuthorDate: Wed Feb 21 23:35:21 2018 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Wed Feb 21 23:36:24 2018 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=572861a1

test_filter_bash_env.py: fix DeprecationWarning: invalid escape sequence \$

Fixes: f1367a2eeb0c ("filter-bash-environment.py: use buffered input, raw bytes (bug 647654)")

 pym/portage/tests/bin/test_filter_bash_env.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/bin/test_filter_bash_env.py b/pym/portage/tests/bin/test_filter_bash_env.py
index 10847bb7d..d906ea793 100644
--- a/pym/portage/tests/bin/test_filter_bash_env.py
+++ b/pym/portage/tests/bin/test_filter_bash_env.py
@@ -16,7 +16,7 @@ class TestFilterBashEnv(TestCase):
 		test_cases = (
 			(
 				'RDEPEND BASH.* _EPATCH_ECLASS',
-				b'''declare -ir BASHPID="28997"
+				br'''declare -ir BASHPID="28997"
 declare -rx A="portage-2.3.24.tar.bz2"
 declare -- DESKTOP_DATABASE_DIR="/usr/share/applications"
 declare PDEPEND="
@@ -53,7 +53,7 @@ use_if_iuse ()
     use $1
 }
 ''',
-				b'''declare -x A="portage-2.3.24.tar.bz2"
+				br'''declare -x A="portage-2.3.24.tar.bz2"
 declare -- DESKTOP_DATABASE_DIR="/usr/share/applications"
 declare PDEPEND="
         !build? (


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2018-02-21 23:37 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-02-21 23:36 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/bin/ Zac Medico
  -- strict thread matches above, loose matches on Subject: below --
2018-01-09 20:59 Zac Medico
2011-12-09  4:58 Zac Medico
2011-11-02  2:27 Zac Medico
2011-10-10  2:29 Mike Frysinger
2011-10-10  2:29 Mike Frysinger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox