From 8dd3fbf6211de0e2f274af47c6fe5a73334f0bb0 Mon Sep 17 00:00:00 2001 From: dec05eba Date: Wed, 3 Jan 2018 21:48:55 +0100 Subject: Fail immediately if test command is run but no test dir is configured --- src/main.cpp | 6 ++++++ 1 file changed, 6 insertions(+) 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 buildFileResult = ninja.build(sibsConfig, buildPath.c_str()); if(buildFileResult.isErr()) -- cgit v1.2.3