Merge lp:~elopio/snappy/go-tests into lp:~fgimenez/snappy/go-functional-tests
- go-tests
- Merge into go-functional-tests
Proposed by
Leo Arias
Status: | Merged |
---|---|
Approved by: | Federico Gimenez |
Approved revision: | 495 |
Merged at revision: | 490 |
Proposed branch: | lp:~elopio/snappy/go-tests |
Merge into: | lp:~fgimenez/snappy/go-functional-tests |
Diff against target: |
319 lines (+51/-39) 14 files modified
cmd/snappy/cmd_install.go (+2/-2) debian/changelog (+8/-0) debian/control (+6/-0) debian/integration-tests/control (+5/-0) debian/integration-tests/snappy_test.go (+1/-1) debian/rules (+6/-0) debian/tests/control (+0/-2) debian/ubuntu-snappy-tests.install (+1/-0) partition/bootloader_uboot_test.go (+2/-5) policy/policy.go (+7/-7) policy/policy_test.go (+7/-5) run-functional-tests.py (+3/-15) snappy/build.go (+1/-0) snappy/snapp.go (+2/-2) |
To merge this branch: | bzr merge lp:~elopio/snappy/go-tests |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Federico Gimenez | Approve | ||
Review via email: mp+261903@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Leo Arias (elopio) wrote : | # |
Revision history for this message
Federico Gimenez (fgimenez) wrote : | # |
Awesome Leo, this is getting into shape :)
review:
Approve
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === modified file 'cmd/snappy/cmd_install.go' | |||
2 | --- cmd/snappy/cmd_install.go 2015-05-19 14:09:19 +0000 | |||
3 | +++ cmd/snappy/cmd_install.go 2015-06-13 19:17:48 +0000 | |||
4 | @@ -34,8 +34,8 @@ | |||
5 | 34 | AllowUnauthenticated bool `long:"allow-unauthenticated" description:"Install snaps even if the signature can not be verified."` | 34 | AllowUnauthenticated bool `long:"allow-unauthenticated" description:"Install snaps even if the signature can not be verified."` |
6 | 35 | DisableGC bool `long:"no-gc" description:"Do not clean up old versions of the package."` | 35 | DisableGC bool `long:"no-gc" description:"Do not clean up old versions of the package."` |
7 | 36 | Positional struct { | 36 | Positional struct { |
10 | 37 | PackageName string `positional-arg-name:"package name" description:"Set configuration for a specific installed package"` | 37 | PackageName string `positional-arg-name:"package name" description:"The Package to install (name or path)"` |
11 | 38 | ConfigFile string `positional-arg-name:"config file" description:"The configuration for the given file"` | 38 | ConfigFile string `positional-arg-name:"config file" description:"The configuration for the given install"` |
12 | 39 | } `positional-args:"yes"` | 39 | } `positional-args:"yes"` |
13 | 40 | } | 40 | } |
14 | 41 | 41 | ||
15 | 42 | 42 | ||
16 | === modified file 'debian/changelog' | |||
17 | --- debian/changelog 2015-06-10 19:17:06 +0000 | |||
18 | +++ debian/changelog 2015-06-13 19:17:48 +0000 | |||
19 | @@ -1,3 +1,11 @@ | |||
20 | 1 | ubuntu-snappy (1.1.2-0ubuntu1) wily; urgency=medium | ||
21 | 2 | |||
22 | 3 | * New upstream release, including the following changes: | ||
23 | 4 | - Remove compatibility for click-bin-path in generated exec-wrappers | ||
24 | 5 | - Release the readme.md after parsing it | ||
25 | 6 | |||
26 | 7 | -- Ricardo Salveti de Araujo <ricardo.salveti@canonical.com> Thu, 11 Jun 2015 23:42:49 -0300 | ||
27 | 8 | |||
28 | 1 | ubuntu-snappy (1.1.1-0ubuntu1) wily; urgency=medium | 9 | ubuntu-snappy (1.1.1-0ubuntu1) wily; urgency=medium |
29 | 2 | 10 | ||
30 | 3 | * New upstream release, including the following changes: | 11 | * New upstream release, including the following changes: |
31 | 4 | 12 | ||
32 | === modified file 'debian/control' | |||
33 | --- debian/control 2015-06-02 20:46:07 +0000 | |||
34 | +++ debian/control 2015-06-13 19:17:48 +0000 | |||
35 | @@ -51,3 +51,9 @@ | |||
36 | 51 | Built-Using: ${misc:Built-Using} | 51 | Built-Using: ${misc:Built-Using} |
37 | 52 | Description: Tool to interact with Ubuntu Core Snappy. | 52 | Description: Tool to interact with Ubuntu Core Snappy. |
38 | 53 | Manage an Ubuntu system with snappy. | 53 | Manage an Ubuntu system with snappy. |
39 | 54 | |||
40 | 55 | Package: ubuntu-snappy-tests | ||
41 | 56 | Architecture: any | ||
42 | 57 | Depends: ubuntu-snappy-cli (= ${binary:Version}), | ||
43 | 58 | ${misc:Depends} | ||
44 | 59 | Description: snappy selftests | ||
45 | 54 | 60 | ||
46 | === added directory 'debian/integration-tests' | |||
47 | === added file 'debian/integration-tests/control' | |||
48 | --- debian/integration-tests/control 1970-01-01 00:00:00 +0000 | |||
49 | +++ debian/integration-tests/control 2015-06-13 19:17:48 +0000 | |||
50 | @@ -0,0 +1,5 @@ | |||
51 | 1 | Test-Command: snappy.test | ||
52 | 2 | Depends: ubuntu-snappy-tests | ||
53 | 3 | |||
54 | 4 | #Test-Command: ./snappy-selftest --yes-really | ||
55 | 5 | #Depends: | ||
56 | 0 | 6 | ||
57 | === renamed file 'debian/tests/snappy_test.go' => 'debian/integration-tests/snappy_test.go' | |||
58 | --- debian/tests/snappy_test.go 2015-06-10 15:13:16 +0000 | |||
59 | +++ debian/integration-tests/snappy_test.go 2015-06-13 19:17:48 +0000 | |||
60 | @@ -4,7 +4,7 @@ | |||
61 | 4 | "os/exec" | 4 | "os/exec" |
62 | 5 | "testing" | 5 | "testing" |
63 | 6 | 6 | ||
65 | 7 | . "launchpad.net/gocheck" | 7 | . "gopkg.in/check.v1" |
66 | 8 | ) | 8 | ) |
67 | 9 | 9 | ||
68 | 10 | // Hook up gocheck into the "go test" runner | 10 | // Hook up gocheck into the "go test" runner |
69 | 11 | 11 | ||
70 | === modified file 'debian/rules' | |||
71 | --- debian/rules 2015-04-14 16:46:57 +0000 | |||
72 | +++ debian/rules 2015-06-13 19:17:48 +0000 | |||
73 | @@ -4,6 +4,7 @@ | |||
74 | 4 | #export DH_VERBOSE=1 | 4 | #export DH_VERBOSE=1 |
75 | 5 | export DH_OPTIONS | 5 | export DH_OPTIONS |
76 | 6 | export DH_GOPKG := launchpad.net/snappy | 6 | export DH_GOPKG := launchpad.net/snappy |
77 | 7 | DH_BUILDDIR = obj-$(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) | ||
78 | 7 | 8 | ||
79 | 8 | %: | 9 | %: |
80 | 9 | dh $@ --buildsystem=golang --with=golang --fail-missing --with systemd | 10 | dh $@ --buildsystem=golang --with=golang --fail-missing --with systemd |
81 | @@ -50,6 +51,11 @@ | |||
82 | 50 | -pubuntu-snappy \ | 51 | -pubuntu-snappy \ |
83 | 51 | snappy-autopilot.service | 52 | snappy-autopilot.service |
84 | 52 | 53 | ||
85 | 54 | override_dh_auto_build: | ||
86 | 55 | dh_auto_build | ||
87 | 56 | GOPATH=$$PWD/$(DH_BUILDDIR) go test -c debian/integration-tests/snappy_test.go | ||
88 | 57 | mv snappy.test $$PWD/$(DH_BUILDDIR)/bin | ||
89 | 58 | |||
90 | 53 | override_dh_auto_install: | 59 | override_dh_auto_install: |
91 | 54 | dh_auto_install -O--buildsystem=golang | 60 | dh_auto_install -O--buildsystem=golang |
92 | 55 | # Making the packages private | 61 | # Making the packages private |
93 | 56 | 62 | ||
94 | === removed directory 'debian/tests' | |||
95 | === removed file 'debian/tests/control' | |||
96 | --- debian/tests/control 2015-06-11 09:15:25 +0000 | |||
97 | +++ debian/tests/control 1970-01-01 00:00:00 +0000 | |||
98 | @@ -1,2 +0,0 @@ | |||
99 | 1 | Tests: tests.test | ||
100 | 2 | Restrictions: allow-stderr | ||
101 | 3 | 0 | ||
102 | === added file 'debian/ubuntu-snappy-tests.install' | |||
103 | --- debian/ubuntu-snappy-tests.install 1970-01-01 00:00:00 +0000 | |||
104 | +++ debian/ubuntu-snappy-tests.install 2015-06-13 19:17:48 +0000 | |||
105 | @@ -0,0 +1,1 @@ | |||
106 | 1 | /usr/bin/snappy.test | ||
107 | 0 | 2 | ||
108 | === modified file 'partition/bootloader_uboot_test.go' | |||
109 | --- partition/bootloader_uboot_test.go 2015-06-09 17:43:20 +0000 | |||
110 | +++ partition/bootloader_uboot_test.go 2015-06-13 19:17:48 +0000 | |||
111 | @@ -204,7 +204,6 @@ | |||
112 | 204 | 204 | ||
113 | 205 | // mock the hardwareYaml and the cacheDir | 205 | // mock the hardwareYaml and the cacheDir |
114 | 206 | p.hardwareSpecFile = makeHardwareYaml(c, "bootloader: grub") | 206 | p.hardwareSpecFile = makeHardwareYaml(c, "bootloader: grub") |
115 | 207 | defaultCacheDir = c.MkDir() | ||
116 | 208 | 207 | ||
117 | 209 | err = bootloader.HandleAssets() | 208 | err = bootloader.HandleAssets() |
118 | 210 | c.Assert(err, NotNil) | 209 | c.Assert(err, NotNil) |
119 | @@ -221,7 +220,6 @@ | |||
120 | 221 | bootloader: u-boot | 220 | bootloader: u-boot |
121 | 222 | partition-layout: inplace | 221 | partition-layout: inplace |
122 | 223 | `) | 222 | `) |
123 | 224 | defaultCacheDir = c.MkDir() | ||
124 | 225 | 223 | ||
125 | 226 | err = bootloader.HandleAssets() | 224 | err = bootloader.HandleAssets() |
126 | 227 | c.Assert(err, NotNil) | 225 | c.Assert(err, NotNil) |
127 | @@ -229,12 +227,12 @@ | |||
128 | 229 | 227 | ||
129 | 230 | func (s *PartitionTestSuite) TestHandleAssetsNoHardwareYaml(c *C) { | 228 | func (s *PartitionTestSuite) TestHandleAssetsNoHardwareYaml(c *C) { |
130 | 231 | s.makeFakeUbootEnv(c) | 229 | s.makeFakeUbootEnv(c) |
131 | 230 | defaultCacheDir = c.MkDir() | ||
132 | 231 | |||
133 | 232 | p := New() | 232 | p := New() |
134 | 233 | bootloader, err := bootloader(p) | 233 | bootloader, err := bootloader(p) |
135 | 234 | c.Assert(err, IsNil) | 234 | c.Assert(err, IsNil) |
136 | 235 | 235 | ||
137 | 236 | defaultCacheDir = c.MkDir() | ||
138 | 237 | |||
139 | 238 | c.Assert(bootloader.HandleAssets(), IsNil) | 236 | c.Assert(bootloader.HandleAssets(), IsNil) |
140 | 239 | } | 237 | } |
141 | 240 | 238 | ||
142 | @@ -247,7 +245,6 @@ | |||
143 | 247 | p.hardwareSpecFile = makeHardwareYaml(c, ` | 245 | p.hardwareSpecFile = makeHardwareYaml(c, ` |
144 | 248 | bootloader u-boot | 246 | bootloader u-boot |
145 | 249 | `) | 247 | `) |
146 | 250 | defaultCacheDir = c.MkDir() | ||
147 | 251 | 248 | ||
148 | 252 | c.Assert(bootloader.HandleAssets(), NotNil) | 249 | c.Assert(bootloader.HandleAssets(), NotNil) |
149 | 253 | } | 250 | } |
150 | 254 | 251 | ||
151 | === modified file 'policy/policy.go' | |||
152 | --- policy/policy.go 2015-05-15 13:33:27 +0000 | |||
153 | +++ policy/policy.go 2015-06-13 19:17:48 +0000 | |||
154 | @@ -60,7 +60,7 @@ | |||
155 | 60 | // Directories are created as needed. Errors out with any of the things that | 60 | // Directories are created as needed. Errors out with any of the things that |
156 | 61 | // could go wrong with this, including a file found by glob not being a | 61 | // could go wrong with this, including a file found by glob not being a |
157 | 62 | // regular file. | 62 | // regular file. |
159 | 63 | func iterOp(op policyOp, glob string, targetDir string, prefix string) (err error) { | 63 | func iterOp(op policyOp, glob, targetDir, prefix string) (err error) { |
160 | 64 | if err = os.MkdirAll(targetDir, 0755); err != nil { | 64 | if err = os.MkdirAll(targetDir, 0755); err != nil { |
161 | 65 | return fmt.Errorf("unable to make %v directory: %v", targetDir, err) | 65 | return fmt.Errorf("unable to make %v directory: %v", targetDir, err) |
162 | 66 | } | 66 | } |
163 | @@ -104,11 +104,11 @@ | |||
164 | 104 | 104 | ||
165 | 105 | // frameworkOp perform the given operation (either Install or Remove) on the | 105 | // frameworkOp perform the given operation (either Install or Remove) on the |
166 | 106 | // given package that's installed in the given path. | 106 | // given package that's installed in the given path. |
168 | 107 | func frameworkOp(op policyOp, pkgName string, instPath string) error { | 107 | func frameworkOp(op policyOp, pkgName, instPath, rootDir string) error { |
169 | 108 | pol := filepath.Join(instPath, "meta", "framework-policy") | 108 | pol := filepath.Join(instPath, "meta", "framework-policy") |
170 | 109 | for _, i := range []string{"apparmor", "seccomp"} { | 109 | for _, i := range []string{"apparmor", "seccomp"} { |
171 | 110 | for _, j := range []string{"policygroups", "templates"} { | 110 | for _, j := range []string{"policygroups", "templates"} { |
173 | 111 | if err := iterOp(op, filepath.Join(pol, i, j, "*"), filepath.Join(SecBase, i, j), pkgName+"_"); err != nil { | 111 | if err := iterOp(op, filepath.Join(pol, i, j, "*"), filepath.Join(rootDir, SecBase, i, j), pkgName+"_"); err != nil { |
174 | 112 | return err | 112 | return err |
175 | 113 | } | 113 | } |
176 | 114 | } | 114 | } |
177 | @@ -119,14 +119,14 @@ | |||
178 | 119 | 119 | ||
179 | 120 | // Install sets up the framework's policy from the given snap that's | 120 | // Install sets up the framework's policy from the given snap that's |
180 | 121 | // installed in the given path. | 121 | // installed in the given path. |
183 | 122 | func Install(pkgName string, instPath string) error { | 122 | func Install(pkgName, instPath, rootDir string) error { |
184 | 123 | return frameworkOp(install, pkgName, instPath) | 123 | return frameworkOp(install, pkgName, instPath, rootDir) |
185 | 124 | } | 124 | } |
186 | 125 | 125 | ||
187 | 126 | // Remove cleans up the framework's policy from the given snap that's | 126 | // Remove cleans up the framework's policy from the given snap that's |
188 | 127 | // installed in the given path. | 127 | // installed in the given path. |
191 | 128 | func Remove(pkgName string, instPath string) error { | 128 | func Remove(pkgName, instPath, rootDir string) error { |
192 | 129 | return frameworkOp(remove, pkgName, instPath) | 129 | return frameworkOp(remove, pkgName, instPath, rootDir) |
193 | 130 | } | 130 | } |
194 | 131 | 131 | ||
195 | 132 | func aaUp(old, new, dir, pfx string) map[string]bool { | 132 | func aaUp(old, new, dir, pfx string) map[string]bool { |
196 | 133 | 133 | ||
197 | === modified file 'policy/policy_test.go' | |||
198 | --- policy/policy_test.go 2015-06-02 20:53:10 +0000 | |||
199 | +++ policy/policy_test.go 2015-06-13 19:17:48 +0000 | |||
200 | @@ -26,8 +26,9 @@ | |||
201 | 26 | "path/filepath" | 26 | "path/filepath" |
202 | 27 | "testing" | 27 | "testing" |
203 | 28 | 28 | ||
204 | 29 | "sort" | ||
205 | 30 | |||
206 | 29 | . "gopkg.in/check.v1" | 31 | . "gopkg.in/check.v1" |
207 | 30 | "sort" | ||
208 | 31 | ) | 32 | ) |
209 | 32 | 33 | ||
210 | 33 | // Hook up check.v1 into the "go test" runner. | 34 | // Hook up check.v1 into the "go test" runner. |
211 | @@ -140,13 +141,14 @@ | |||
212 | 140 | } | 141 | } |
213 | 141 | 142 | ||
214 | 142 | func (s *policySuite) TestFrameworkRoundtrip(c *C) { | 143 | func (s *policySuite) TestFrameworkRoundtrip(c *C) { |
215 | 144 | rootDir := c.MkDir() | ||
216 | 143 | SecBase = s.dest | 145 | SecBase = s.dest |
218 | 144 | c.Check(Install("foo", s.orig), IsNil) | 146 | c.Check(Install("foo", s.orig, rootDir), IsNil) |
219 | 145 | // check the files were copied, with the packagename prepended properly | 147 | // check the files were copied, with the packagename prepended properly |
221 | 146 | g, err := filepath.Glob(filepath.Join(SecBase, "*", "*", "foo_*")) | 148 | g, err := filepath.Glob(filepath.Join(rootDir, SecBase, "*", "*", "foo_*")) |
222 | 147 | c.Check(err, IsNil) | 149 | c.Check(err, IsNil) |
223 | 148 | c.Check(g, HasLen, 4*3) | 150 | c.Check(g, HasLen, 4*3) |
225 | 149 | c.Check(Remove("foo", s.orig), IsNil) | 151 | c.Check(Remove("foo", s.orig, rootDir), IsNil) |
226 | 150 | g, err = filepath.Glob(filepath.Join(SecBase, "*", "*", "*")) | 152 | g, err = filepath.Glob(filepath.Join(SecBase, "*", "*", "*")) |
227 | 151 | c.Check(err, IsNil) | 153 | c.Check(err, IsNil) |
228 | 152 | c.Check(g, HasLen, 0) | 154 | c.Check(g, HasLen, 0) |
229 | @@ -155,7 +157,7 @@ | |||
230 | 155 | func (s *policySuite) TestFrameworkError(c *C) { | 157 | func (s *policySuite) TestFrameworkError(c *C) { |
231 | 156 | // check we get errors from the iterOp, is all | 158 | // check we get errors from the iterOp, is all |
232 | 157 | SecBase = s.dest | 159 | SecBase = s.dest |
234 | 158 | c.Check(frameworkOp(42, "foo", s.orig), ErrorMatches, ".*unknown operation.*") | 160 | c.Check(frameworkOp(42, "foo", s.orig, ""), ErrorMatches, ".*unknown operation.*") |
235 | 159 | } | 161 | } |
236 | 160 | 162 | ||
237 | 161 | func (s *policySuite) TestOpString(c *C) { | 163 | func (s *policySuite) TestOpString(c *C) { |
238 | 162 | 164 | ||
239 | === modified file 'run-functional-tests.py' | |||
240 | --- run-functional-tests.py 2015-06-12 08:02:18 +0000 | |||
241 | +++ run-functional-tests.py 2015-06-13 19:17:48 +0000 | |||
242 | @@ -45,7 +45,7 @@ | |||
243 | 45 | print("Building debs...") | 45 | print("Building debs...") |
244 | 46 | prepare_target_dir(DEBS_DIR) | 46 | prepare_target_dir(DEBS_DIR) |
245 | 47 | return subprocess.check_output([ | 47 | return subprocess.check_output([ |
247 | 48 | 'bzr-buildpackage', | 48 | 'bzr', 'bd', |
248 | 49 | '--result-dir={}'.format(DEBS_DIR), | 49 | '--result-dir={}'.format(DEBS_DIR), |
249 | 50 | HERE, | 50 | HERE, |
250 | 51 | '--', '-uc', '-us', | 51 | '--', '-uc', '-us', |
251 | @@ -65,7 +65,8 @@ | |||
252 | 65 | "dpkg -i {debs_dir}/*deb".format(debs_dir=DEBS_TESTBED_PATH), | 65 | "dpkg -i {debs_dir}/*deb".format(debs_dir=DEBS_TESTBED_PATH), |
253 | 66 | '--setup-commands', | 66 | '--setup-commands', |
254 | 67 | 'sync; sleep 2; mount -o remount,ro /', | 67 | 'sync; sleep 2; mount -o remount,ro /', |
256 | 68 | '--unbuilt-tree', HERE, | 68 | '--override-control', 'debian/integration-tests/control', |
257 | 69 | '--built-tree', HERE, | ||
258 | 69 | '--output-dir', OUTPUT_DIR, | 70 | '--output-dir', OUTPUT_DIR, |
259 | 70 | "--copy={orig_debs_dir}:{target_debs_dir}".format( | 71 | "--copy={orig_debs_dir}:{target_debs_dir}".format( |
260 | 71 | orig_debs_dir=DEBS_DIR, | 72 | orig_debs_dir=DEBS_DIR, |
261 | @@ -77,24 +78,11 @@ | |||
262 | 77 | '--', '-i', IMAGE_TARGET, | 78 | '--', '-i', IMAGE_TARGET, |
263 | 78 | ]) | 79 | ]) |
264 | 79 | 80 | ||
265 | 80 | |||
266 | 81 | def compile_tests(): | ||
267 | 82 | print("Compiling tests...") | ||
268 | 83 | return subprocess.check_output([ | ||
269 | 84 | 'go', | ||
270 | 85 | 'test', | ||
271 | 86 | '-c', | ||
272 | 87 | '-o snappy' | ||
273 | 88 | ], cwd="{base}/debian/tests/".format(base=HERE)) | ||
274 | 89 | |||
275 | 90 | |||
276 | 91 | def main(): | 81 | def main(): |
277 | 92 | build_debs() | 82 | build_debs() |
278 | 93 | 83 | ||
279 | 94 | create_image() | 84 | create_image() |
280 | 95 | 85 | ||
281 | 96 | compile_tests() | ||
282 | 97 | |||
283 | 98 | adt_run() | 86 | adt_run() |
284 | 99 | 87 | ||
285 | 100 | return 0 | 88 | return 0 |
286 | 101 | 89 | ||
287 | === modified file 'snappy/build.go' | |||
288 | --- snappy/build.go 2015-06-03 12:06:17 +0000 | |||
289 | +++ snappy/build.go 2015-06-13 19:17:48 +0000 | |||
290 | @@ -101,6 +101,7 @@ | |||
291 | 101 | if err != nil { | 101 | if err != nil { |
292 | 102 | return "", "", err | 102 | return "", "", err |
293 | 103 | } | 103 | } |
294 | 104 | defer file.Close() | ||
295 | 104 | 105 | ||
296 | 105 | scanner := bufio.NewScanner(file) | 106 | scanner := bufio.NewScanner(file) |
297 | 106 | for scanner.Scan() { | 107 | for scanner.Scan() { |
298 | 107 | 108 | ||
299 | === modified file 'snappy/snapp.go' | |||
300 | --- snappy/snapp.go 2015-06-09 19:11:54 +0000 | |||
301 | +++ snappy/snapp.go 2015-06-13 19:17:48 +0000 | |||
302 | @@ -939,7 +939,7 @@ | |||
303 | 939 | } | 939 | } |
304 | 940 | 940 | ||
305 | 941 | if s.Type() == pkg.TypeFramework { | 941 | if s.Type() == pkg.TypeFramework { |
307 | 942 | if err := policy.Install(s.Name(), s.basedir); err != nil { | 942 | if err := policy.Install(s.Name(), s.basedir, globalRootDir); err != nil { |
308 | 943 | return err | 943 | return err |
309 | 944 | } | 944 | } |
310 | 945 | } | 945 | } |
311 | @@ -1001,7 +1001,7 @@ | |||
312 | 1001 | } | 1001 | } |
313 | 1002 | 1002 | ||
314 | 1003 | if s.Type() == pkg.TypeFramework { | 1003 | if s.Type() == pkg.TypeFramework { |
316 | 1004 | if err := policy.Remove(s.Name(), s.basedir); err != nil { | 1004 | if err := policy.Remove(s.Name(), s.basedir, globalRootDir); err != nil { |
317 | 1005 | return err | 1005 | return err |
318 | 1006 | } | 1006 | } |
319 | 1007 | } | 1007 | } |
@federico: if you merge yours with trunk you will see a nicer diff.
Here I'm playing with building the tests into a package, instead of compiling them as part of the script. It's a little ugly, it would be nice to get some comments from a go packager.