blob: 3ecc419ab2ee5d221ebfb288e01659d69d97b0c3 [file] [log] [blame]
Colin Cross4d9c2d12016-07-29 12:48:20 -07001// Copyright 2016 Google Inc. All rights reserved.
2//
3// Licensed under the Apache License, Version 2.0 (the "License");
4// you may not use this file except in compliance with the License.
5// You may obtain a copy of the License at
6//
7// http://www.apache.org/licenses/LICENSE-2.0
8//
9// Unless required by applicable law or agreed to in writing, software
10// distributed under the License is distributed on an "AS IS" BASIS,
11// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12// See the License for the specific language governing permissions and
13// limitations under the License.
14
15package cc
16
17import (
18 "path/filepath"
19 "strings"
20
Colin Cross4d9c2d12016-07-29 12:48:20 -070021 "android/soong/android"
Colin Cross303e21f2018-08-07 16:49:25 -070022 "android/soong/tradefed"
Colin Cross4d9c2d12016-07-29 12:48:20 -070023)
24
Colin Crossb916a382016-07-29 17:28:03 -070025type TestProperties struct {
Colin Cross4d9c2d12016-07-29 12:48:20 -070026 // if set, build against the gtest library. Defaults to true.
Colin Cross600c9df2016-09-13 12:26:16 -070027 Gtest *bool
Christopher Ferris9df92d62018-08-21 12:40:08 -070028
29 // if set, use the isolated gtest runner. Defaults to false.
30 Isolated *bool
Colin Crossb916a382016-07-29 17:28:03 -070031}
Colin Cross4d9c2d12016-07-29 12:48:20 -070032
Colin Crossb916a382016-07-29 17:28:03 -070033type TestBinaryProperties struct {
Colin Cross4d9c2d12016-07-29 12:48:20 -070034 // Create a separate binary for each source file. Useful when there is
35 // global state that can not be torn down and reset between each test suite.
36 Test_per_src *bool
Dan Willemsen3340d602016-12-27 14:40:40 -080037
38 // Disables the creation of a test-specific directory when used with
39 // relative_install_path. Useful if several tests need to be in the same
40 // directory, but test_per_src doesn't work.
41 No_named_install_directory *bool
Colin Crossfaeb7aa2017-02-01 14:12:44 -080042
43 // list of files or filegroup modules that provide data that should be installed alongside
44 // the test
45 Data []string
Colin Crossa929db02017-03-27 16:27:50 -070046
47 // list of compatibility suites (for example "cts", "vts") that the module should be
48 // installed into.
Dan Willemsen15d54d52017-09-18 16:49:28 -070049 Test_suites []string `android:"arch_variant"`
Julien Despreze146e392018-08-02 15:00:46 -070050
51 // the name of the test configuration (for example "AndroidTest.xml") that should be
52 // installed with the module.
53 Test_config *string `android:"arch_variant"`
Jack He33338892018-09-19 02:21:28 -070054
55 // the name of the test configuration template (for example "AndroidTestTemplate.xml") that
56 // should be installed with the module.
57 Test_config_template *string `android:"arch_variant"`
Colin Cross4d9c2d12016-07-29 12:48:20 -070058}
59
60func init() {
Steven Moreland87c9d7b2017-11-02 21:38:28 -070061 android.RegisterModuleType("cc_test", TestFactory)
62 android.RegisterModuleType("cc_test_library", TestLibraryFactory)
63 android.RegisterModuleType("cc_benchmark", BenchmarkFactory)
64 android.RegisterModuleType("cc_test_host", TestHostFactory)
65 android.RegisterModuleType("cc_benchmark_host", BenchmarkHostFactory)
Colin Cross4d9c2d12016-07-29 12:48:20 -070066}
67
68// Module factory for tests
Steven Moreland87c9d7b2017-11-02 21:38:28 -070069func TestFactory() android.Module {
Colin Cross4d9c2d12016-07-29 12:48:20 -070070 module := NewTest(android.HostAndDeviceSupported)
71 return module.Init()
72}
73
74// Module factory for test libraries
Steven Moreland87c9d7b2017-11-02 21:38:28 -070075func TestLibraryFactory() android.Module {
Colin Cross4d9c2d12016-07-29 12:48:20 -070076 module := NewTestLibrary(android.HostAndDeviceSupported)
77 return module.Init()
78}
79
80// Module factory for benchmarks
Steven Moreland87c9d7b2017-11-02 21:38:28 -070081func BenchmarkFactory() android.Module {
Colin Cross4d9c2d12016-07-29 12:48:20 -070082 module := NewBenchmark(android.HostAndDeviceSupported)
83 return module.Init()
84}
85
86// Module factory for host tests
Steven Moreland87c9d7b2017-11-02 21:38:28 -070087func TestHostFactory() android.Module {
Colin Cross4d9c2d12016-07-29 12:48:20 -070088 module := NewTest(android.HostSupported)
89 return module.Init()
90}
91
92// Module factory for host benchmarks
Steven Moreland87c9d7b2017-11-02 21:38:28 -070093func BenchmarkHostFactory() android.Module {
Colin Cross4d9c2d12016-07-29 12:48:20 -070094 module := NewBenchmark(android.HostSupported)
95 return module.Init()
96}
97
Colin Crossb916a382016-07-29 17:28:03 -070098type testPerSrc interface {
99 testPerSrc() bool
100 srcs() []string
101 setSrc(string, string)
102}
103
104func (test *testBinary) testPerSrc() bool {
105 return Bool(test.Properties.Test_per_src)
106}
107
108func (test *testBinary) srcs() []string {
109 return test.baseCompiler.Properties.Srcs
110}
111
112func (test *testBinary) setSrc(name, src string) {
113 test.baseCompiler.Properties.Srcs = []string{src}
Nan Zhang0007d812017-11-07 10:57:05 -0800114 test.binaryDecorator.Properties.Stem = StringPtr(name)
Colin Crossb916a382016-07-29 17:28:03 -0700115}
116
117var _ testPerSrc = (*testBinary)(nil)
118
Colin Cross4d9c2d12016-07-29 12:48:20 -0700119func testPerSrcMutator(mctx android.BottomUpMutatorContext) {
120 if m, ok := mctx.Module().(*Module); ok {
Colin Crossb916a382016-07-29 17:28:03 -0700121 if test, ok := m.linker.(testPerSrc); ok {
122 if test.testPerSrc() && len(test.srcs()) > 0 {
Jooyung Hana61ff2c2019-02-28 18:06:34 +0900123 if duplicate, found := checkDuplicate(test.srcs()); found {
124 mctx.PropertyErrorf("srcs", "found a duplicate entry %q", duplicate)
125 return
126 }
Colin Crossb916a382016-07-29 17:28:03 -0700127 testNames := make([]string, len(test.srcs()))
128 for i, src := range test.srcs() {
Colin Cross4d9c2d12016-07-29 12:48:20 -0700129 testNames[i] = strings.TrimSuffix(filepath.Base(src), filepath.Ext(src))
130 }
131 tests := mctx.CreateLocalVariations(testNames...)
Colin Crossb916a382016-07-29 17:28:03 -0700132 for i, src := range test.srcs() {
133 tests[i].(*Module).linker.(testPerSrc).setSrc(testNames[i], src)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700134 }
135 }
136 }
137 }
138}
139
Jooyung Hana61ff2c2019-02-28 18:06:34 +0900140func checkDuplicate(values []string) (duplicate string, found bool) {
141 seen := make(map[string]string)
142 for _, v := range values {
143 if duplicate, found = seen[v]; found {
144 return
145 }
146 seen[v] = v
147 }
148 return
149}
150
Colin Crossb916a382016-07-29 17:28:03 -0700151type testDecorator struct {
152 Properties TestProperties
153 linker *baseLinker
Colin Cross4d9c2d12016-07-29 12:48:20 -0700154}
155
Colin Cross600c9df2016-09-13 12:26:16 -0700156func (test *testDecorator) gtest() bool {
Colin Cross38b40df2018-04-10 16:14:46 -0700157 return BoolDefault(test.Properties.Gtest, true)
Colin Cross600c9df2016-09-13 12:26:16 -0700158}
159
Colin Crossb916a382016-07-29 17:28:03 -0700160func (test *testDecorator) linkerFlags(ctx ModuleContext, flags Flags) Flags {
Colin Cross600c9df2016-09-13 12:26:16 -0700161 if !test.gtest() {
Colin Cross4d9c2d12016-07-29 12:48:20 -0700162 return flags
163 }
164
165 flags.CFlags = append(flags.CFlags, "-DGTEST_HAS_STD_STRING")
166 if ctx.Host() {
167 flags.CFlags = append(flags.CFlags, "-O0", "-g")
168
169 switch ctx.Os() {
170 case android.Windows:
171 flags.CFlags = append(flags.CFlags, "-DGTEST_OS_WINDOWS")
172 case android.Linux:
173 flags.CFlags = append(flags.CFlags, "-DGTEST_OS_LINUX")
Colin Cross4d9c2d12016-07-29 12:48:20 -0700174 case android.Darwin:
175 flags.CFlags = append(flags.CFlags, "-DGTEST_OS_MAC")
Colin Cross4d9c2d12016-07-29 12:48:20 -0700176 }
177 } else {
178 flags.CFlags = append(flags.CFlags, "-DGTEST_OS_LINUX_ANDROID")
179 }
180
181 return flags
182}
183
Colin Crossb916a382016-07-29 17:28:03 -0700184func (test *testDecorator) linkerDeps(ctx BaseModuleContext, deps Deps) Deps {
Colin Cross600c9df2016-09-13 12:26:16 -0700185 if test.gtest() {
Jeff Gastonaf3cc2d2017-09-27 17:01:44 -0700186 if ctx.useSdk() && ctx.Device() {
Dan Albert7dd58992018-02-09 15:22:59 -0800187 deps.StaticLibs = append(deps.StaticLibs, "libgtest_main_ndk_c++", "libgtest_ndk_c++")
Christopher Ferris9df92d62018-08-21 12:40:08 -0700188 } else if BoolDefault(test.Properties.Isolated, false) {
189 deps.StaticLibs = append(deps.StaticLibs, "libgtest_isolated_main")
Colin Cross4d9c2d12016-07-29 12:48:20 -0700190 } else {
191 deps.StaticLibs = append(deps.StaticLibs, "libgtest_main", "libgtest")
192 }
193 }
Colin Crossb916a382016-07-29 17:28:03 -0700194
Colin Cross4d9c2d12016-07-29 12:48:20 -0700195 return deps
196}
197
Colin Crossb916a382016-07-29 17:28:03 -0700198func (test *testDecorator) linkerInit(ctx BaseModuleContext, linker *baseLinker) {
yangbillb3174d12018-05-07 06:41:20 +0000199 // 1. Add ../../lib[64] to rpath so that out/host/linux-x86/nativetest/<test dir>/<test> can
Colin Crossbd75e1d2017-06-30 17:27:55 -0700200 // find out/host/linux-x86/lib[64]/library.so
yangbillb3174d12018-05-07 06:41:20 +0000201 // 2. Add ../../../lib[64] to rpath so that out/host/linux-x86/testcases/<test dir>/<CPU>/<test> can
202 // also find out/host/linux-x86/lib[64]/library.so
203 runpaths := []string{"../../lib", "../../../lib"}
204 for _, runpath := range runpaths {
205 if ctx.toolchain().Is64Bit() {
206 runpath += "64"
207 }
208 linker.dynamicProperties.RunPaths = append(linker.dynamicProperties.RunPaths, runpath)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700209 }
Colin Crossbd75e1d2017-06-30 17:27:55 -0700210
211 // add "" to rpath so that test binaries can find libraries in their own test directory
212 linker.dynamicProperties.RunPaths = append(linker.dynamicProperties.RunPaths, "")
Colin Cross4d9c2d12016-07-29 12:48:20 -0700213}
214
Colin Crossb916a382016-07-29 17:28:03 -0700215func (test *testDecorator) linkerProps() []interface{} {
216 return []interface{}{&test.Properties}
Colin Cross4d9c2d12016-07-29 12:48:20 -0700217}
218
Colin Crossb916a382016-07-29 17:28:03 -0700219func NewTestInstaller() *baseInstaller {
220 return NewBaseInstaller("nativetest", "nativetest64", InstallInData)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700221}
222
Colin Crossb916a382016-07-29 17:28:03 -0700223type testBinary struct {
224 testDecorator
225 *binaryDecorator
226 *baseCompiler
Colin Crossb916a382016-07-29 17:28:03 -0700227 Properties TestBinaryProperties
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800228 data android.Paths
Colin Cross303e21f2018-08-07 16:49:25 -0700229 testConfig android.Path
Colin Crossb916a382016-07-29 17:28:03 -0700230}
231
232func (test *testBinary) linkerProps() []interface{} {
233 props := append(test.testDecorator.linkerProps(), test.binaryDecorator.linkerProps()...)
234 props = append(props, &test.Properties)
235 return props
236}
237
238func (test *testBinary) linkerInit(ctx BaseModuleContext) {
239 test.testDecorator.linkerInit(ctx, test.binaryDecorator.baseLinker)
240 test.binaryDecorator.linkerInit(ctx)
241}
242
Colin Cross37047f12016-12-13 17:06:13 -0800243func (test *testBinary) linkerDeps(ctx DepsContext, deps Deps) Deps {
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800244 android.ExtractSourcesDeps(ctx, test.Properties.Data)
Colin Cross303e21f2018-08-07 16:49:25 -0700245 android.ExtractSourceDeps(ctx, test.Properties.Test_config)
Jack He33338892018-09-19 02:21:28 -0700246 android.ExtractSourceDeps(ctx, test.Properties.Test_config_template)
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800247
Colin Crossb916a382016-07-29 17:28:03 -0700248 deps = test.testDecorator.linkerDeps(ctx, deps)
249 deps = test.binaryDecorator.linkerDeps(ctx, deps)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700250 return deps
251}
252
Colin Crossb916a382016-07-29 17:28:03 -0700253func (test *testBinary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
254 flags = test.binaryDecorator.linkerFlags(ctx, flags)
255 flags = test.testDecorator.linkerFlags(ctx, flags)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700256 return flags
257}
258
Colin Crossb916a382016-07-29 17:28:03 -0700259func (test *testBinary) install(ctx ModuleContext, file android.Path) {
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800260 test.data = ctx.ExpandSources(test.Properties.Data, nil)
Julien Desprezeb7398e2019-02-28 08:45:28 -0800261 optionsMap := map[string]string{}
262 if Bool(test.testDecorator.Properties.Isolated) {
263 optionsMap["not-shardable"] = "true"
264 }
Jack He33338892018-09-19 02:21:28 -0700265 test.testConfig = tradefed.AutoGenNativeTestConfig(ctx, test.Properties.Test_config,
Julien Desprezeb7398e2019-02-28 08:45:28 -0800266 test.Properties.Test_config_template,
267 test.Properties.Test_suites, optionsMap)
Colin Crossfaeb7aa2017-02-01 14:12:44 -0800268
Colin Cross600c9df2016-09-13 12:26:16 -0700269 test.binaryDecorator.baseInstaller.dir = "nativetest"
270 test.binaryDecorator.baseInstaller.dir64 = "nativetest64"
Dan Willemsen3340d602016-12-27 14:40:40 -0800271
272 if !Bool(test.Properties.No_named_install_directory) {
273 test.binaryDecorator.baseInstaller.relative = ctx.ModuleName()
Nan Zhang0007d812017-11-07 10:57:05 -0800274 } else if String(test.binaryDecorator.baseInstaller.Properties.Relative_install_path) == "" {
Dan Willemsen3340d602016-12-27 14:40:40 -0800275 ctx.PropertyErrorf("no_named_install_directory", "Module install directory may only be disabled if relative_install_path is set")
276 }
277
Dan Willemsen1d577e22016-08-29 15:53:15 -0700278 test.binaryDecorator.baseInstaller.install(ctx, file)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700279}
280
281func NewTest(hod android.HostOrDeviceSupported) *Module {
Colin Crossb916a382016-07-29 17:28:03 -0700282 module, binary := NewBinary(hod)
283 module.multilib = android.MultilibBoth
Dan Willemsen1d577e22016-08-29 15:53:15 -0700284 binary.baseInstaller = NewTestInstaller()
Colin Crossb916a382016-07-29 17:28:03 -0700285
286 test := &testBinary{
287 testDecorator: testDecorator{
288 linker: binary.baseLinker,
Colin Cross4d9c2d12016-07-29 12:48:20 -0700289 },
Colin Crossb916a382016-07-29 17:28:03 -0700290 binaryDecorator: binary,
291 baseCompiler: NewBaseCompiler(),
Colin Cross4d9c2d12016-07-29 12:48:20 -0700292 }
Colin Crossb916a382016-07-29 17:28:03 -0700293 module.compiler = test
294 module.linker = test
295 module.installer = test
Colin Cross4d9c2d12016-07-29 12:48:20 -0700296 return module
297}
298
Colin Crossb916a382016-07-29 17:28:03 -0700299type testLibrary struct {
300 testDecorator
301 *libraryDecorator
302}
303
304func (test *testLibrary) linkerProps() []interface{} {
305 return append(test.testDecorator.linkerProps(), test.libraryDecorator.linkerProps()...)
306}
307
308func (test *testLibrary) linkerInit(ctx BaseModuleContext) {
309 test.testDecorator.linkerInit(ctx, test.libraryDecorator.baseLinker)
310 test.libraryDecorator.linkerInit(ctx)
311}
312
Colin Cross37047f12016-12-13 17:06:13 -0800313func (test *testLibrary) linkerDeps(ctx DepsContext, deps Deps) Deps {
Colin Crossb916a382016-07-29 17:28:03 -0700314 deps = test.testDecorator.linkerDeps(ctx, deps)
315 deps = test.libraryDecorator.linkerDeps(ctx, deps)
316 return deps
317}
318
319func (test *testLibrary) linkerFlags(ctx ModuleContext, flags Flags) Flags {
320 flags = test.libraryDecorator.linkerFlags(ctx, flags)
321 flags = test.testDecorator.linkerFlags(ctx, flags)
322 return flags
323}
324
Colin Cross4d9c2d12016-07-29 12:48:20 -0700325func NewTestLibrary(hod android.HostOrDeviceSupported) *Module {
Colin Crossab3b7322016-12-09 14:46:15 -0800326 module, library := NewLibrary(android.HostAndDeviceSupported)
Dan Willemsen28bda512016-08-31 16:32:55 -0700327 library.baseInstaller = NewTestInstaller()
Colin Crossb916a382016-07-29 17:28:03 -0700328 test := &testLibrary{
329 testDecorator: testDecorator{
330 linker: library.baseLinker,
Colin Cross4d9c2d12016-07-29 12:48:20 -0700331 },
Colin Crossb916a382016-07-29 17:28:03 -0700332 libraryDecorator: library,
Colin Cross4d9c2d12016-07-29 12:48:20 -0700333 }
Colin Crossb916a382016-07-29 17:28:03 -0700334 module.linker = test
Colin Cross4d9c2d12016-07-29 12:48:20 -0700335 return module
336}
337
Colin Crosse28f4e22017-04-24 18:10:29 -0700338type BenchmarkProperties struct {
Anders Lewisb97e8182017-07-14 15:20:13 -0700339 // list of files or filegroup modules that provide data that should be installed alongside
340 // the test
341 Data []string
342
Colin Crosse28f4e22017-04-24 18:10:29 -0700343 // list of compatibility suites (for example "cts", "vts") that the module should be
344 // installed into.
Julien Despreze146e392018-08-02 15:00:46 -0700345 Test_suites []string `android:"arch_variant"`
346
347 // the name of the test configuration (for example "AndroidTest.xml") that should be
348 // installed with the module.
349 Test_config *string `android:"arch_variant"`
Jack He33338892018-09-19 02:21:28 -0700350
351 // the name of the test configuration template (for example "AndroidTestTemplate.xml") that
352 // should be installed with the module.
353 Test_config_template *string `android:"arch_variant"`
Colin Crosse28f4e22017-04-24 18:10:29 -0700354}
355
Colin Crossb916a382016-07-29 17:28:03 -0700356type benchmarkDecorator struct {
357 *binaryDecorator
Colin Crosse28f4e22017-04-24 18:10:29 -0700358 Properties BenchmarkProperties
Anders Lewisb97e8182017-07-14 15:20:13 -0700359 data android.Paths
Colin Cross303e21f2018-08-07 16:49:25 -0700360 testConfig android.Path
Colin Cross4d9c2d12016-07-29 12:48:20 -0700361}
362
Colin Crossb916a382016-07-29 17:28:03 -0700363func (benchmark *benchmarkDecorator) linkerInit(ctx BaseModuleContext) {
364 runpath := "../../lib"
365 if ctx.toolchain().Is64Bit() {
366 runpath += "64"
367 }
368 benchmark.baseLinker.dynamicProperties.RunPaths = append(benchmark.baseLinker.dynamicProperties.RunPaths, runpath)
369 benchmark.binaryDecorator.linkerInit(ctx)
370}
371
Colin Crosse28f4e22017-04-24 18:10:29 -0700372func (benchmark *benchmarkDecorator) linkerProps() []interface{} {
373 props := benchmark.binaryDecorator.linkerProps()
374 props = append(props, &benchmark.Properties)
375 return props
376}
377
Colin Cross37047f12016-12-13 17:06:13 -0800378func (benchmark *benchmarkDecorator) linkerDeps(ctx DepsContext, deps Deps) Deps {
Anders Lewisb97e8182017-07-14 15:20:13 -0700379 android.ExtractSourcesDeps(ctx, benchmark.Properties.Data)
Colin Cross303e21f2018-08-07 16:49:25 -0700380 android.ExtractSourceDeps(ctx, benchmark.Properties.Test_config)
Jack He33338892018-09-19 02:21:28 -0700381 android.ExtractSourceDeps(ctx, benchmark.Properties.Test_config_template)
Colin Cross303e21f2018-08-07 16:49:25 -0700382
Colin Crossb916a382016-07-29 17:28:03 -0700383 deps = benchmark.binaryDecorator.linkerDeps(ctx, deps)
Colin Cross4d9c2d12016-07-29 12:48:20 -0700384 deps.StaticLibs = append(deps.StaticLibs, "libgoogle-benchmark")
385 return deps
386}
387
Colin Crossb916a382016-07-29 17:28:03 -0700388func (benchmark *benchmarkDecorator) install(ctx ModuleContext, file android.Path) {
Anders Lewisb97e8182017-07-14 15:20:13 -0700389 benchmark.data = ctx.ExpandSources(benchmark.Properties.Data, nil)
Jack He33338892018-09-19 02:21:28 -0700390 benchmark.testConfig = tradefed.AutoGenNativeBenchmarkTestConfig(ctx, benchmark.Properties.Test_config,
yangbill4f41bc22019-02-13 21:45:47 +0800391 benchmark.Properties.Test_config_template, benchmark.Properties.Test_suites)
Colin Cross303e21f2018-08-07 16:49:25 -0700392
Colin Cross28690e92017-09-08 16:20:30 -0700393 benchmark.binaryDecorator.baseInstaller.dir = filepath.Join("benchmarktest", ctx.ModuleName())
394 benchmark.binaryDecorator.baseInstaller.dir64 = filepath.Join("benchmarktest64", ctx.ModuleName())
Dan Willemsen1d577e22016-08-29 15:53:15 -0700395 benchmark.binaryDecorator.baseInstaller.install(ctx, file)
Colin Crossb916a382016-07-29 17:28:03 -0700396}
397
Colin Cross4d9c2d12016-07-29 12:48:20 -0700398func NewBenchmark(hod android.HostOrDeviceSupported) *Module {
Colin Crossb916a382016-07-29 17:28:03 -0700399 module, binary := NewBinary(hod)
400 module.multilib = android.MultilibBoth
Colin Cross28690e92017-09-08 16:20:30 -0700401 binary.baseInstaller = NewBaseInstaller("benchmarktest", "benchmarktest64", InstallInData)
Colin Crossb916a382016-07-29 17:28:03 -0700402
403 benchmark := &benchmarkDecorator{
404 binaryDecorator: binary,
Colin Cross4d9c2d12016-07-29 12:48:20 -0700405 }
Colin Crossb916a382016-07-29 17:28:03 -0700406 module.linker = benchmark
407 module.installer = benchmark
Colin Cross4d9c2d12016-07-29 12:48:20 -0700408 return module
409}