From 242b03bc8da841a9527ad845eb60275008155afb Mon Sep 17 00:00:00 2001 From: Roland Reichwein Date: Thu, 9 May 2024 15:37:06 +0200 Subject: Run tests --- ymake.cpp | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'ymake.cpp') diff --git a/ymake.cpp b/ymake.cpp index a3eec6a..cc3e00e 100644 --- a/ymake.cpp +++ b/ymake.cpp @@ -34,7 +34,11 @@ using namespace std::string_literals; namespace { void usage() { - std::cout << "Usage: ymake " << std::endl; + std::cout << "Usage: ymake []" << std::endl; + std::cout << " with one of:" << std::endl; + std::cout << " build (same as no action specified)" << std::endl; + std::cout << " clean" << std::endl; + std::cout << " test" << std::endl; } } @@ -55,11 +59,16 @@ int ymake(int argc, char* argv[]) exit(1); } - Builder builder(ptree); - if (action == "default"s || action == "build") { // build + if (action == "default" || action == "build") { // build + Builder builder(ptree, "build"); builder.build(); } else if (action == "clean") { + Builder builder(ptree, "*"); builder.clean(); + } else if (action == "test") { + Builder builder(ptree, "test"); + builder.build(); + builder.run_tests(); } else if (action == "install") { throw std::runtime_error("unimplemented"); } else if (action == "rebuild") { -- cgit v1.2.3