1 |
Author: zmedico |
2 |
Date: 2009-09-27 18:30:44 +0000 (Sun, 27 Sep 2009) |
3 |
New Revision: 14447 |
4 |
|
5 |
Modified: |
6 |
main/trunk/pym/portage/tests/bin/setup_env.py |
7 |
Log: |
8 |
Fix binTestsInit() to use correct values for PORTAGE_BIN_PATH and |
9 |
PORTAGE_PYM_PATH. |
10 |
|
11 |
|
12 |
Modified: main/trunk/pym/portage/tests/bin/setup_env.py |
13 |
=================================================================== |
14 |
--- main/trunk/pym/portage/tests/bin/setup_env.py 2009-09-27 18:23:32 UTC (rev 14446) |
15 |
+++ main/trunk/pym/portage/tests/bin/setup_env.py 2009-09-27 18:30:44 UTC (rev 14447) |
16 |
@@ -9,11 +9,12 @@ |
17 |
from portage import shutil |
18 |
from portage.tests import TestCase |
19 |
from portage.process import spawn |
20 |
-from portage.const import PORTAGE_BIN_PATH |
21 |
|
22 |
-bindir = os.path.join(os.path.dirname(os.path.dirname( |
23 |
+basepath = os.path.join(os.path.dirname(os.path.dirname( |
24 |
os.path.abspath(__file__))), |
25 |
- "..", "..", "..", "bin", "ebuild-helpers") |
26 |
+ "..", "..", "..") |
27 |
+bindir = os.path.join(basepath, "bin") |
28 |
+pymdir = os.path.join(basepath, "pym") |
29 |
basedir = None |
30 |
env = None |
31 |
|
32 |
@@ -35,7 +36,8 @@ |
33 |
env["S"] = os.path.join(basedir, "workdir") |
34 |
env["PF"] = "portage-tests-0.09-r1" |
35 |
env["PATH"] = bindir + ":" + env["PATH"] |
36 |
- env["PORTAGE_BIN_PATH"] = PORTAGE_BIN_PATH |
37 |
+ env["PORTAGE_BIN_PATH"] = bindir |
38 |
+ env["PORTAGE_PYM_PATH"] = pymdir |
39 |
os.mkdir(env["D"]) |
40 |
os.mkdir(env["T"]) |
41 |
os.mkdir(env["S"]) |
42 |
@@ -76,9 +78,10 @@ |
43 |
return portage_func(*newargs) |
44 |
return derived_func |
45 |
|
46 |
-for bin in os.listdir(bindir): |
47 |
+for bin in os.listdir(os.path.join(bindir, "ebuild-helpers")): |
48 |
if bin.startswith("do") or \ |
49 |
bin.startswith("new") or \ |
50 |
bin.startswith("prep") or \ |
51 |
bin in ["ecompress","ecompressdir","fowners","fperms"]: |
52 |
- globals()[bin] = create_portage_wrapper(os.path.join(bindir, bin)) |
53 |
+ globals()[bin] = create_portage_wrapper( |
54 |
+ os.path.join(bindir, "ebuild-helpers", bin)) |