From d078f6dc10eb265a5d88cd96adf86173d6d3ba2e Mon Sep 17 00:00:00 2001 From: Flu0r1ne Date: Thu, 2 Sep 2021 03:14:47 -0500 Subject: Make adapters and internals complient with new directory structure --- adapters/gtest/config.go | 21 +++------------------ 1 file changed, 3 insertions(+), 18 deletions(-) (limited to 'adapters/gtest/config.go') diff --git a/adapters/gtest/config.go b/adapters/gtest/config.go index cff45fa..4f8735f 100644 --- a/adapters/gtest/config.go +++ b/adapters/gtest/config.go @@ -5,6 +5,7 @@ import ( "golang.flu0r1ne.net/planr" "strings" "github.com/BurntSushi/toml" + "path" ) type GtestDefaults struct { @@ -42,29 +43,13 @@ func (g GtestConfig) ensureSatisfied(path string) { } } -func (cfg GtestConfig) joinTests(path_ string) string { - if cfg.Test_root == nil { - return planr.JoinConfigDir("tests", path_) - } - - return planr.JoinConfigDir(*cfg.Test_root, path_) -} - -func (cfg GtestConfig) joinSrcs(path_ string) string { - if cfg.Srcs_root == nil { - return planr.JoinConfigDir("../src", path_) - } - - return planr.JoinConfigDir(*cfg.Srcs_root, path_) -} - -func (cfg GtestConfig) srcList() string { +func (cfg GtestConfig) srcList(srcDir string) string { var srcList string if cfg.Srcs != nil { srcs := make([]string, len(*cfg.Srcs)) for i, src := range *cfg.Srcs { - srcs[i] = "\"" + cfg.joinSrcs(src) + "\"" + srcs[i] = "\"" + path.Join(srcDir, src) + "\"" } srcList = strings.Join(srcs, "\n ") -- cgit v1.2.3