summaryrefslogtreecommitdiffstats
path: root/src/includes_normalize_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* fix normalizer test for _MAX_PATHTakuto Ikuta2017-09-051-28/+25
|
* Make clparser fastertikuta2017-05-081-34/+9
| | | | | | | | | | This patch improves perfromance of clparser. * Reduce the number of calling GetFullPathName. * Use StringPiece for Split and Join. * Add EqualsCaseInsensitive for StringPiece not to generate new string instance. * Add some utility member in StringPiece class.
* Remove unnecessary `std::`Tetsuo Kiso2016-01-101-5/+5
|
* push error to caller and abort on failureScott Graham2015-06-091-33/+50
|
* Fix crash in attempting to canonicalize paths longer than _MAX_PATHScott Graham2015-06-081-0/+47
|
* CanonicalizePath handles \ on WindowsScott Graham2014-10-301-15/+15
|
* Fix building tests on Windows again.Nico Weber2014-09-181-0/+2
| | | | | | | Turns out gtest was pulling in sys/stat.h, and we were using stat() through that in tests. This doesn't work with old MSVCs, so we should probably replace that with RealDiskInterface in a follow-up.
* Use a small, standalone testing framework instead of googletest.Nico Weber2014-09-181-2/+0
| | | | | | | | | | | | | | | | | | | | | 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.
* add deps_prefix for localized /showIncludes' output parsingPeter Kümmel2013-10-181-1/+1
|
* Stop `-t msvc -o` from lowercasing paths from /showIncludes output.Nico Weber2013-05-291-10/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | /showIncludes prints absolute paths. If a source file says `#include <WiNdOwS.h>`, /showIncludes will use that spelling in its output for the basename and use the on-disk cache for the directory names in the rest for its output. This makes the .d files created by `-t msvc -o` consistent with the .d files written by gcc and clang. Before this change, `-t msvc -o` would convert this output to lower case. This is a problem if a build step produces a header file with mixed case, such as "RuntimeFeatures.h". Due to the lowercasing, the .d file would contain "runtimefeatures.h", while the build step will create "RuntimeFeatures.h". Due to the case difference, ninja would not realize that regeneration of the .h file would require a rebuild of all source files having the header in the .d file. (On the next build, ninja would rebuild them since stat()ing is not case-sensitive on Windows.) One possible fix for this is to make sure that generators always write generated header files in lower case too, but on Mac gcc doesn't do lower-casing and .d files end up with the case-as-written, so generators would have to be different on Mac and Windows, which is undesirable. If case-insensitve path comparisons are useful, they should be done somewhere else (e.g. in CanonicalizePath()) where they affect both paths read from .d files and paths read from .ninja files. This should then be controlled by a top-level variable. This patch changes behavior, but it only has an effect on generated header files, which aren't common, and it only affects -t msvc, which is still marked as experimental. (cmake doesn't use it yet.) (If a file has both `#include <windows.h>` and `<Windows.h>`, this will now take 2 stat() calls instead of just one, but that should have a negligible cost.)
* wrap some overlong linesEvan Martin2012-12-291-5/+11
|
* includes_normalize: also lowercase cross-drive includesEvan Martin2012-08-121-3/+3
| | | | It seems to me inconsistent to normalize one but not the other.
* add functions for normalizing win32 include pathsScott Graham2012-08-121-0/+98
(Note from Evan: this is landing Scott's code more or less verbatim without a lot of analysis; it could maybe be simplified and reduced, but it's only intended to be used in the MSVC helper so it's fine to be experimental.)