aboutsummaryrefslogtreecommitdiff
path: root/backend
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-10-01 15:01:39 +0200
committerdec05eba <dec05eba@protonmail.com>2020-07-06 07:39:33 +0200
commit88effd4a0d63e37a2851712f63a9709a1e322946 (patch)
tree8a6334a870f56afb5bf76c32d0bd202de694995c /backend
parent69c7ec31219d666bba4f053fcce07d4df58b8ba2 (diff)
Fix sibs not finding test code in subdirs of test dir
Fix platform specific configs, not all configs were checked
Diffstat (limited to 'backend')
-rw-r--r--backend/BackendUtils.cpp2
-rw-r--r--backend/ninja/Ninja.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/backend/BackendUtils.cpp b/backend/BackendUtils.cpp
index 4e1a0e8..92a73ef 100644
--- a/backend/BackendUtils.cpp
+++ b/backend/BackendUtils.cpp
@@ -104,7 +104,7 @@ namespace backend
projectConfPath += TINYDIR_STRING("project.conf");
auto projectConfFileType = getFileType(projectConfPath.c_str());
- if(projectConfFileType == FileType::REGULAR)
+ if(!sibsConfig.isTest() && getFileType(projectConfPath.c_str()) == FileType::REGULAR)
{
backend::Ninja *subProject = new backend::Ninja();
diff --git a/backend/ninja/Ninja.cpp b/backend/ninja/Ninja.cpp
index 0c9cf0e..666bba7 100644
--- a/backend/ninja/Ninja.cpp
+++ b/backend/ninja/Ninja.cpp
@@ -1485,7 +1485,7 @@ namespace backend
bool zigTest = false;
if(config.zigTestAllFiles)
{
- backend::BackendUtils::collectSourceFiles(testSourceDirNative.c_str(), &ninja, sibsTestConfig, false);
+ backend::BackendUtils::collectSourceFiles(testSourceDirNative.c_str(), &ninja, sibsTestConfig);
// TODO: This can be optimized as well. No need to insert non-zig files if we are going to remove them.
// Maybe pass a filter callback function to @collectSourceFiles.
for(auto it = ninja.sourceFiles.begin(); it != ninja.sourceFiles.end(); )
@@ -1512,7 +1512,7 @@ namespace backend
}
else
{
- backend::BackendUtils::collectSourceFiles(testSourceDirNative.c_str(), &ninja, sibsTestConfig, false);
+ backend::BackendUtils::collectSourceFiles(testSourceDirNative.c_str(), &ninja, sibsTestConfig);
}
if(!ninja.getSourceFiles().empty())