summaryrefslogtreecommitdiff
path: root/adapters/gtest/config.go
diff options
context:
space:
mode:
authorflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-06 02:12:52 -0500
committerflu0r1ne <flu0r1ne@flu0r1ne.net>2021-09-06 02:12:52 -0500
commitfd4ff9192a004ade9174a58dd51abb31277fc1a7 (patch)
tree0b19b37c8a0ad66986dba2ed63b1066a7318ab72 /adapters/gtest/config.go
parent087c51bed9da75f5585d176a7b14396cd70f2638 (diff)
parent788ae3e0266bdb12bdff6c260dda2e3bcbdfc79c (diff)
downloaddeb-planr-fd4ff9192a004ade9174a58dd51abb31277fc1a7.tar.xz
deb-planr-fd4ff9192a004ade9174a58dd51abb31277fc1a7.zip
Merge branch 'upstream' into ppa
Update to v0.1.1
Diffstat (limited to 'adapters/gtest/config.go')
-rw-r--r--adapters/gtest/config.go42
1 files changed, 19 insertions, 23 deletions
diff --git a/adapters/gtest/config.go b/adapters/gtest/config.go
index 533f266..71b5cca 100644
--- a/adapters/gtest/config.go
+++ b/adapters/gtest/config.go
@@ -13,21 +13,25 @@ const (
)
type Defaults struct {
- Name string
- Suite string
- Testfile string
- Srcs []string
- Timeout uint
+ Name string
+ Suite string
+ Testfile string
+ Srcs []string
+ Timeout uint
+ Include_src *bool
+ Compiler_options string
}
func (child *Defaults) Inherit(p interface{}) {
parent := p.(*Defaults)
- if(child.Name == "") { child.Name = parent.Name }
- if(child.Suite == "") { child.Suite = parent.Suite }
- if(child.Testfile == "") { child.Testfile = parent.Testfile }
- if(len(child.Srcs) == 0) { child.Srcs = parent.Srcs }
- if(child.Timeout == 0) { child.Timeout = parent.Timeout }
+ if(child.Name == "") { child.Name = parent.Name }
+ if(child.Suite == "") { child.Suite = parent.Suite }
+ if(child.Testfile == "") { child.Testfile = parent.Testfile }
+ if(len(child.Srcs) == 0) { child.Srcs = parent.Srcs }
+ if(child.Timeout == 0) { child.Timeout = parent.Timeout }
+ if(child.Compiler_options == "") { child.Compiler_options = parent.Compiler_options }
+ if(child.Include_src == nil) { child.Include_src = parent.Include_src}
}
@@ -47,6 +51,11 @@ func (c * Config) finalize(path string) {
if c.Timeout == 0 {
c.Timeout = DEFAULT_TIMEOUT;
}
+
+ if c.Include_src == nil {
+ c.Include_src = new(bool)
+ *c.Include_src = true
+ }
}
func srcList(srcdir string, srcs []string) string {
@@ -61,19 +70,6 @@ func srcList(srcdir string, srcs []string) string {
return builder.String()
}
-func cmakeUnits(e []executable, dirs planr.DirConfig) []cmakeUnit {
-
- units := make([]cmakeUnit, len(e))
- for i, exe := range e {
- testpath := path.Join(dirs.Tests(), exe.testpath)
- srclist := srcList(dirs.Src(), exe.srcs)
-
- units[i] = cmakeUnit { exe.exeNm, testpath, srclist }
- }
-
- return units
-}
-
func finalizeConfigs(tcs []planr.TestCase) {
for i := range tcs {
cfg := tcs[i].AdapterConfig().(*Config)