Skip to content

Commit

Permalink
Run tests with debug
Browse files Browse the repository at this point in the history
  • Loading branch information
ken-matsui committed Dec 18, 2023
1 parent 3890215 commit 1e77d14
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ jobs:
run: ./poac-out/debug/poac test --verbose

- name: Third Generation Build & Test
run: ./poac-out/debug/poac --verbose run --release test --verbose --release
run: ./poac-out/debug/poac --verbose run --release test --verbose

# - name: Test Poac
# run: ctest --output-on-failure --verbose
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
run: ./poac-out/debug/poac test --verbose

- name: Third Generation Build & Test
run: ./poac-out/debug/poac --verbose run --release test --verbose --release
run: ./poac-out/debug/poac --verbose run --release test --verbose

# - name: Test Poac
# run: ctest --output-on-failure --verbose
Expand Down
5 changes: 5 additions & 0 deletions src/Cmd/Test.cc
Original file line number Diff line number Diff line change
@@ -1,10 +1,15 @@
#include "Test.hpp"

#include "../BuildConfig.hpp"
#include "../Logger.hpp"

#include <iostream>

int test(Vec<String> args) {
if (!args.empty() && (args[0] == "-r" || args[0] == "--release")) {
Logger::warn("The `--release` flag can disable assert macros.");
}

const String outDir = emitMakefile(args.empty() ? "" : args[0]);
return std::system(("make -C " + outDir + " test").c_str());
}
Expand Down
2 changes: 1 addition & 1 deletion src/Logger.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class Logger {
getInstance().log(LogLevel::error, std::forward<Args>(message)...);
}
template <typename... Args>
static void warning(Args... message) {
static void warn(Args... message) {
getInstance().log(LogLevel::warning, std::forward<Args>(message)...);
}
template <typename... Args>
Expand Down

0 comments on commit 1e77d14

Please sign in to comment.