aboutsummaryrefslogtreecommitdiff
path: root/adapters/gtest/config.go
diff options
context:
space:
mode:
authorFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-02 03:14:47 -0500
committerFlu0r1ne <flur01ne@flu0r1ne.net>2021-09-02 03:14:47 -0500
commitd078f6dc10eb265a5d88cd96adf86173d6d3ba2e (patch)
treeed8bc2405b60b2ae31405c3d8e27b24fda3ac003 /adapters/gtest/config.go
parent96701f87a114557f1a013229e889b4b726aa7dc1 (diff)
downloadplanr-d078f6dc10eb265a5d88cd96adf86173d6d3ba2e.tar.xz
planr-d078f6dc10eb265a5d88cd96adf86173d6d3ba2e.zip
Make adapters and internals complient with new directory structure
Diffstat (limited to 'adapters/gtest/config.go')
-rw-r--r--adapters/gtest/config.go21
1 files changed, 3 insertions, 18 deletions
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 ")