Skip to content
This repository has been archived by the owner on Jan 7, 2019. It is now read-only.

Commit

Permalink
[tests] Include build info for unittest.
Browse files Browse the repository at this point in the history
  • Loading branch information
strongly-typed committed May 14, 2017
1 parent ead2a6d commit b70e0a5
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,9 @@ else:
template = template)

sources = [runner] + files.sources

# build xpcc_build_info.hpp file
env.BuildInfoHeader()

# build the program
program = env.Program(target = 'executable',
Expand Down
7 changes: 7 additions & 0 deletions templates/unittest/runner_stm32.cpp.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@

#include <xpcc/architecture/platform.hpp>

#include <xpcc_build_info.hpp>

#include <unittest/reporter.hpp>
#include <unittest/controller.hpp>

Expand Down Expand Up @@ -36,6 +38,11 @@ main()

loggerDevice.write("Unittests (" __DATE__ ", " __TIME__")\n");

XPCC_LOG_INFO << "Machine: " << XPCC_BUILD_MACHINE << xpcc::endl;
XPCC_LOG_INFO << "User: " << XPCC_BUILD_USER << xpcc::endl;
XPCC_LOG_INFO << "Os: " << XPCC_BUILD_OS << xpcc::endl;
XPCC_LOG_INFO << "Compiler: " << XPCC_BUILD_COMPILER << xpcc::endl;

unittest::Reporter reporter(loggerDevice);
unittest::Controller::instance().setReporter(reporter);

Expand Down

0 comments on commit b70e0a5

Please sign in to comment.