aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2018-01-03 21:48:55 +0100
committerdec05eba <dec05eba@protonmail.com>2018-01-03 21:48:59 +0100
commit8dd3fbf6211de0e2f274af47c6fe5a73334f0bb0 (patch)
tree0f12f6c775b9896f56c3090407cf577699640540
parent8b052110d8802eda3d4d76700bde8ecc80dbf79a (diff)
Fail immediately if test command is run but no test dir is configured
-rw-r--r--src/main.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/main.cpp b/src/main.cpp
index f16bf64..d4de6e0 100644
--- a/src/main.cpp
+++ b/src/main.cpp
@@ -238,6 +238,12 @@ int buildProject(const FileString &projectPath, const FileString &projectConfFil
}
};
walkDir(projectPath.c_str(), collectSourceFiles);
+
+ if(sibsConfig.shouldBuildTests() && sibsConfig.getTestPath().empty())
+ {
+ printf("Project is missing package.tests config. No tests to build\n");
+ exit(0);
+ }
Result<bool> buildFileResult = ninja.build(sibsConfig, buildPath.c_str());
if(buildFileResult.isErr())