| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
Let me know if you use these!
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Ninja currently uses googletest for testing. That makes building
ninja_test somewhat annoying since it requires that one passes
--with-gtest PATH to configure. It turns out just implementing the bits
of googletest that ninja uses needs about the same amount of code than
making the --with-gtest flag in configure.py work and making googletest
print test results in a way we want (!)
In addition to making configuration simpler, this also makes compiling
tests much faster: On my system, touching src/build_test.cc (the slowest
file to build in ninja) and rebuilding ninja_tests is twice as fast than
without this patch. Building all is noticeably faster too: 5.6s with
this patch, 9.1s without this patch (38% faster).
The most noticeable things missing: EXPECT_* and ASSERT_* don't support
streaming notes to them with operator<<, and for failing tests the lhs
and rhs are not printed. That's so that this header does not have to
include sstream, which slows down building ninja_test almost 20%.
If this turns out to be annoying, we can maybe add it.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
For some reason that I do not, ninja prefers:
struct Foo {
Foo();
private:
void Blah();
};
Rather than
class Foo {
public:
Foo();
private:
void Blah();
};
This catches the last two usages of "class" in the code base.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|
|
|
| |
We "using namespace std" anywhere we need a std::string or a std::vector.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
| |
This is just a proof-of-concept. The terminal printing logic should be
extracted from src/build.cc and then reused here.
|
|
|
|
| |
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|
|
|
| |
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|
|
|
|
|
| |
disk_interface_test.cc
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|
|
|
|
|
| |
TEST=ninja_test --gtest_filter=DiskInterface*
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
|
|
|
|
|
| |
This was a TODO in src/ninja_jumble.cc. Now this task is completed.
Signed-off-by: Thiago Farina <tfarina@chromium.org>
|
| |
|
|
|
|
|
| |
All tests except SubProcess pass on a native Windows build
Tests continue not to build on a platform=mingw build
|
| |
|
| |
|
|
|
|
|
| |
It links, with some hacks.
Tests still fail.
|
| |
|
|
|
|
|
|
| |
Clean all was not returning non-zero when an error occur (like when
failing to remove a directory). This patch fix the problem and add a test
for it.
|
|
|
|
| |
It also fix a bug about the count of removed file reported.
|
|
|
|
|
| |
E.g. when parsing "foo = ${bar", point at the correct location of
the missing curly brace.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|