summaryrefslogtreecommitdiffstats
path: root/src/clean_test.cc
Commit message (Collapse)AuthorAgeFilesLines
* Let Stat() have an err outparam instead of writing to stderr.Nico Weber2015-03-311-38/+47
| | | | | | | | | Also check for Stat() failure in a few more places. This way, ninja doesn't print two "ninja: error: " lines if stat() fails during a build. It also makes it easier to keep the stat tests quiet. Every caller of Stat() needs to explicitly log the error string if that's desired.
* Make "depfile=$out.d" work if $out contains escaped characters, rspfile too.Nico Weber2014-05-211-0/+28
| | | | | | | | | | | | | | Fixes #730. This has always been broken, but due to #690 more paths are now escaped (e.g. paths containing + characters, like file.c++). Also see discussion in #689. The approach is to give EdgeEnv an enum deciding on whether or not to escape file names, and provide functions that evaluate depfile and rspfile with that set that to kNoEscape. (depfile=$out.d doesn't make sense on edges with multiple outputs.) This should be relatively safe, as $in and $out can't be used on edges, only on rules (#687).
* CleanTest cleanups:Nico Weber2014-05-211-6/+2
| | | | | * $in only makes sense on rules, not edges (see issue #687) * Remove unneccesary clear() line at end of test
* move test virtual time "now_" into VirtualFileSystemEvan Martin2013-04-081-46/+46
| | | | It's the only piece that cares about the current time.
* Merge branch 'dont-clean-phony' of git://github.com/pcc/ninjaEvan Martin2012-04-261-0/+25
|\ | | | | | | | | Conflicts: src/clean.cc
| * Don't delete phony targets when cleaning a specified targetPeter Collingbourne2012-02-281-0/+25
| | | | | | | | Also, modify Cleaner::CleanAll to use Edge::is_phony.
* | Remove depfiles when running when running "ninja -t clean <target>"Qingning Huo2012-03-141-0/+30
|/ | | | or "ninja -t clean -r <rule>"
* Response filesunknown2012-02-091-0/+61
|
* Have the clean tool remove depfilesPeter Collingbourne2011-12-061-0/+15
|
* Implement generator rulesPeter Collingbourne2011-10-151-0/+22
| | | | | | | | | | | | | Introduce a rule attribute "generator" which, if present, specifies that this rule is used to re-invoke the generator program. Files built using generator rules are treated specially in two ways: firstly, they will not be rebuilt if the command line changes; and secondly, they are not cleaned by default. A command line flag "-g" is introduced for the clean tool, which causes it to remove generator files. Fixes issue #102.
* windows: fix more signedness warningsEvan Martin2011-05-081-12/+12
|
* The cleaner can be used multiple times now.Nicolas Despres2011-05-021-90/+48
|
* Return non-zero status when errors occur.Nicolas Despres2011-05-021-4/+12
| | | | | | 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.
* Add a test for the clean tool.Nicolas Despres2011-05-021-0/+255
It also fix a bug about the count of removed file reported.