summaryrefslogtreecommitdiffstats
path: root/pym
diff options
context:
space:
mode:
authorZac Medico <zmedico@gentoo.org>2007-06-21 12:16:49 +0000
committerZac Medico <zmedico@gentoo.org>2007-06-21 12:16:49 +0000
commit8b8fd2c44ebcde74c38ac9a04acc564cf3409909 (patch)
tree8a98378fda16cc98fec47b67f02c9b79e7ef0b0c /pym
parent30633be7220b5ed8adb8a75dee4642dd2726e452 (diff)
downloadportage-8b8fd2c44ebcde74c38ac9a04acc564cf3409909.tar.gz
portage-8b8fd2c44ebcde74c38ac9a04acc564cf3409909.tar.bz2
portage-8b8fd2c44ebcde74c38ac9a04acc564cf3409909.zip
Fix the test so that it can run inside a sandbox.
svn path=/main/trunk/; revision=6915
Diffstat (limited to 'pym')
-rw-r--r--pym/portage/tests/ebuild/test_spawn.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/pym/portage/tests/ebuild/test_spawn.py b/pym/portage/tests/ebuild/test_spawn.py
index 66e8f9ea7..c694566f2 100644
--- a/pym/portage/tests/ebuild/test_spawn.py
+++ b/pym/portage/tests/ebuild/test_spawn.py
@@ -16,8 +16,10 @@ class SpawnTestCase(TestCase):
os.close(fd)
null_fd = os.open('/dev/null', os.O_RDWR)
test_string = 2 * "blah blah blah\n"
+ # use free=1 to disable sandbox so that this test can run inside a
+ # sandbox (sandbox in sandbox is not currently allowed)
spawn("echo -n '%s'" % test_string, settings, logfile=logfile,
- fd_pipes={0:sys.stdin.fileno(), 1:null_fd, 2:null_fd})
+ free=1, fd_pipes={0:sys.stdin.fileno(), 1:null_fd, 2:null_fd})
os.close(null_fd)
f = open(logfile, 'r')
log_content = f.read()