public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
From: "Zac Medico" <zmedico@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/portage:master commit in: pym/portage/tests/sync/
Date: Tue, 31 Jan 2017 21:03:16 +0000 (UTC)	[thread overview]
Message-ID: <1485896570.0655b4a26e378cf409c9a033514f41c307d01371.zmedico@gentoo> (raw)

commit:     0655b4a26e378cf409c9a033514f41c307d01371
Author:     Alexandru Elisei <alexandru.elisei <AT> gmail <DOT> com>
AuthorDate: Sun Jan 29 18:07:34 2017 +0000
Commit:     Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Tue Jan 31 21:02:50 2017 +0000
URL:        https://gitweb.gentoo.org/proj/portage.git/commit/?id=0655b4a2

test_sync_local: add test for auto-sync set to 'no'

 pym/portage/tests/sync/test_sync_local.py | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/pym/portage/tests/sync/test_sync_local.py b/pym/portage/tests/sync/test_sync_local.py
index bec2e6a..1d38562 100644
--- a/pym/portage/tests/sync/test_sync_local.py
+++ b/pym/portage/tests/sync/test_sync_local.py
@@ -42,7 +42,7 @@ class SyncLocalTestCase(TestCase):
 			location = %(EPREFIX)s/var/repositories/test_repo
 			sync-type = %(sync-type)s
 			sync-uri = file:/%(EPREFIX)s/var/repositories/test_repo_sync
-			auto-sync = yes
+			auto-sync = %(auto-sync)s
 			%(repo_extra_keys)s
 		""")
 
@@ -87,9 +87,11 @@ class SyncLocalTestCase(TestCase):
 		committer_name = "Gentoo Dev"
 		committer_email = "gentoo-dev@gentoo.org"
 
-		def repos_set_conf(sync_type, dflt_keys=None, xtra_keys=None):
+		def repos_set_conf(sync_type, dflt_keys=None, xtra_keys=None,
+			auto_sync="yes"):
 			env["PORTAGE_REPOSITORIES"] = repos_conf % {\
 				"EPREFIX": eprefix, "sync-type": sync_type,
+				"auto-sync": auto_sync,
 				"default_keys": "" if dflt_keys is None else dflt_keys,
 				"repo_extra_keys": "" if xtra_keys is None else xtra_keys}
 
@@ -100,6 +102,12 @@ class SyncLocalTestCase(TestCase):
 			os.unlink(os.path.join(metadata_dir, 'timestamp.chk'))
 
 		sync_cmds = (
+			(homedir, lambda: repos_set_conf("rsync", auto_sync="no")),
+			(homedir, cmds["emerge"] + ("--sync",)),
+			(homedir, lambda: self.assertFalse(os.path.exists(
+				os.path.join(repo.location, "dev-libs", "A")
+				), "dev-libs/A found, expected missing")),
+			(homedir, lambda: repos_set_conf("rsync", auto_sync="yes")),
 			(homedir, cmds["emerge"] + ("--sync",)),
 			(homedir, lambda: self.assertTrue(os.path.exists(
 				os.path.join(repo.location, "dev-libs", "A")


             reply	other threads:[~2017-01-31 21:03 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-31 21:03 Zac Medico [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-05 10:20 [gentoo-commits] proj/portage:master commit in: pym/portage/tests/sync/ Zac Medico
2017-01-28 21:11 Zac Medico
2014-12-04 20:16 Brian Dolbec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1485896570.0655b4a26e378cf409c9a033514f41c307d01371.zmedico@gentoo \
    --to=zmedico@gentoo.org \
    --cc=gentoo-commits@lists.gentoo.org \
    --cc=gentoo-dev@lists.gentoo.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox