diff options
| author | Furkan Sahin <furkan-dev@proton.me> | 2021-09-06 02:12:52 -0500 |
|---|---|---|
| committer | Furkan Sahin <furkan-dev@proton.me> | 2021-09-06 02:12:52 -0500 |
| commit | 08f60342d7219bc5eb67fdf4f071c6fd67548034 (patch) | |
| tree | 015f6af79c764990ef1fbc6ada7515c5d21817ee /adapters/gtest/config.go | |
| parent | b5b5aa22cb9a6e65fc4ba7b8b5f5aff7a2450aec (diff) | |
| parent | 4a38e9734d093e151b281e40479707e34de2c5dd (diff) | |
Merge branch 'upstream' into ppa
Update to v0.1.1
Diffstat (limited to 'adapters/gtest/config.go')
| -rw-r--r-- | adapters/gtest/config.go | 42 |
1 files changed, 19 insertions, 23 deletions
diff --git a/adapters/gtest/config.go b/adapters/gtest/config.go index b8a196b..e862a29 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) |
