|
Ninja
|
#include "build.h"#include <assert.h>#include <climits>#include <stdint.h>#include "build_log.h"#include "deps_log.h"#include "exit_status.h"#include "graph.h"#include "status_printer.h"#include "test.h"
Go to the source code of this file.
Classes | |
| struct | BuildDryRun |
| struct | BuildTest |
| struct | BuildWithDepsLogTest |
| Tests of builds involving deps logs necessarily must span multiple builds. More... | |
| struct | BuildWithLogTest |
| struct | BuildWithQueryDepsLogTest |
| struct | CompareEdgesByOutput |
| struct | FakeCommandRunner |
| Fake implementation of CommandRunner, useful for tests. More... | |
| struct | PlanTest |
| Fixture for tests involving Plan. More... | |
Functions | |
| TEST_F (BuildDryRun, AllCommandsShown) | |
| TEST_F (BuildDryRun, WithDyndep) | |
| TEST_F (BuildTest, Chain) | |
| TEST_F (BuildTest, Console) | |
| TEST_F (BuildTest, DepFileMissing) | |
| TEST_F (BuildTest, DepFileOK) | |
| TEST_F (BuildTest, DepFileParseError) | |
| TEST_F (BuildTest, DepsGccWithEmptyDepfileErrorsOut) | |
| TEST_F (BuildTest, DyndepBuild) | |
| TEST_F (BuildTest, DyndepBuildDiscoverCircular) | |
| TEST_F (BuildTest, DyndepBuildDiscoverImplicitConnection) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNewInput) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNewInputWithTransitiveValidation) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNewInputWithValidation) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNewOutput) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNewOutputWithMultipleRules1) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNewOutputWithMultipleRules2) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNowWantEdge) | |
| TEST_F (BuildTest, DyndepBuildDiscoverNowWantEdgeAndDependent) | |
| TEST_F (BuildTest, DyndepBuildDiscoverOutputAndDepfileInput) | |
| TEST_F (BuildTest, DyndepBuildDiscoverScheduledEdge) | |
| TEST_F (BuildTest, DyndepBuildSyntaxError) | |
| TEST_F (BuildTest, DyndepBuildUnrelatedOutput) | |
| TEST_F (BuildTest, DyndepMissingAndNoRule) | |
| TEST_F (BuildTest, DyndepReadyCircular) | |
| TEST_F (BuildTest, DyndepReadyImplicitConnection) | |
| TEST_F (BuildTest, DyndepReadySyntaxError) | |
| TEST_F (BuildTest, DyndepTwoLevelDirect) | |
| TEST_F (BuildTest, DyndepTwoLevelDiscoveredDirty) | |
| TEST_F (BuildTest, DyndepTwoLevelDiscoveredReady) | |
| TEST_F (BuildTest, DyndepTwoLevelIndirect) | |
| TEST_F (BuildTest, EncounterReadyTwice) | |
| TEST_F (BuildTest, Fail) | |
| TEST_F (BuildTest, FailedDepsParse) | |
| TEST_F (BuildTest, ImplicitOutput) | |
| TEST_F (BuildTest, InterruptCleanup) | |
| TEST_F (BuildTest, MakeDirs) | |
| TEST_F (BuildTest, MissingInput) | |
| TEST_F (BuildTest, MissingInputTarget) | |
| TEST_F (BuildTest, MissingTarget) | |
| TEST_F (BuildTest, MultiOutIn) | |
| TEST_F (BuildTest, NoWork) | |
| TEST_F (BuildTest, OneStep) | |
| TEST_F (BuildTest, OneStep2) | |
| TEST_F (BuildTest, OrderOnlyDeps) | |
| TEST_F (BuildTest, Phony) | |
| TEST_F (BuildTest, PhonyNoWork) | |
| TEST_F (BuildTest, PhonySelfReference) | |
| TEST_F (BuildTest, PhonyUseCase1) | |
| TEST_F (BuildTest, PhonyUseCase2) | |
| TEST_F (BuildTest, PhonyUseCase3) | |
| TEST_F (BuildTest, PhonyUseCase4) | |
| TEST_F (BuildTest, PhonyUseCase5) | |
| TEST_F (BuildTest, PhonyUseCase6) | |
| TEST_F (BuildTest, PhonyWithNoInputs) | |
| TEST_F (BuildTest, PoolEdgesReadyButNotWanted) | |
| TEST_F (BuildTest, RebuildOrderOnlyDeps) | |
| TEST_F (BuildTest, RestatDepfileDependency) | |
| Check that a restat rule generating a header cancels compilations correctly. More... | |
| TEST_F (BuildTest, RestatMissingDepfile) | |
| Check that a restat rule doesn't clear an edge if the depfile is missing. More... | |
| TEST_F (BuildTest, RspFileFailure) | |
| TEST_F (BuildTest, RspFileSuccess) | |
| TEST_F (BuildTest, StatFailureAbortsBuild) | |
| TEST_F (BuildTest, StatusFormatElapsed_e) | |
| TEST_F (BuildTest, StatusFormatElapsed_w) | |
| TEST_F (BuildTest, StatusFormatETA) | |
| TEST_F (BuildTest, StatusFormatReplacePlaceholder) | |
| TEST_F (BuildTest, StatusFormatTimeProgress) | |
| TEST_F (BuildTest, SwallowFailures) | |
| TEST_F (BuildTest, SwallowFailuresLimit) | |
| TEST_F (BuildTest, SwallowFailuresPool) | |
| TEST_F (BuildTest, TwoOutputs) | |
| TEST_F (BuildTest, TwoStep) | |
| TEST_F (BuildTest, Validation) | |
| TEST_F (BuildTest, ValidationCircular) | |
| TEST_F (BuildTest, ValidationDependsOnOutput) | |
| TEST_F (BuildTest, ValidationWithCircularDependency) | |
| TEST_F (BuildTest, WrongOutputInDepfileCausesRebuild) | |
| TEST_F (BuildWithDepsLogTest, DepFileOKDepsLog) | |
| TEST_F (BuildWithDepsLogTest, DepsIgnoredInDryRun) | |
| TEST_F (BuildWithDepsLogTest, DiscoveredDepDuringBuildChanged) | |
| TEST_F (BuildWithDepsLogTest, ObsoleteDeps) | |
| Verify that obsolete dependency info causes a rebuild. More... | |
| TEST_F (BuildWithDepsLogTest, RestatDepfileDependencyDepsLog) | |
| Check that a restat rule generating a header cancels compilations correctly, depslog case. More... | |
| TEST_F (BuildWithDepsLogTest, RestatMissingDepfileDepslog) | |
| Check that a restat rule doesn't clear an edge if the deps are missing. More... | |
| TEST_F (BuildWithDepsLogTest, Straightforward) | |
| Run a straightforward build where the deps log is used. More... | |
| TEST_F (BuildWithDepsLogTest, TestInputMtimeRaceCondition) | |
| TEST_F (BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) | |
| TEST_F (BuildWithDepsLogTest, ValidationThroughDepfile) | |
| TEST_F (BuildWithLogTest, DyndepBuildDiscoverRestat) | |
| TEST_F (BuildWithLogTest, GeneratedPlainDepfileMtime) | |
| TEST_F (BuildWithLogTest, ImplicitGeneratedOutOfDate) | |
| TEST_F (BuildWithLogTest, ImplicitGeneratedOutOfDate2) | |
| TEST_F (BuildWithLogTest, NotInLogButOnDisk) | |
| TEST_F (BuildWithLogTest, RebuildAfterFailure) | |
| TEST_F (BuildWithLogTest, RebuildWithNoInputs) | |
| TEST_F (BuildWithLogTest, RestatInputChangesDueToRule) | |
| TEST_F (BuildWithLogTest, RestatMissingFile) | |
| TEST_F (BuildWithLogTest, RestatMissingInput) | |
| TEST_F (BuildWithLogTest, RestatSingleDependentOutputDirty) | |
| TEST_F (BuildWithLogTest, RestatTest) | |
| TEST_F (BuildWithLogTest, RspFileCmdLineChange) | |
| TEST_F (BuildWithQueryDepsLogTest, TwoOutputsDepFileGCCMultiLineInput) | |
| Test a GCC-style deps log with multiple outputs using a line per input. More... | |
| TEST_F (BuildWithQueryDepsLogTest, TwoOutputsDepFileGCCMultiLineOutput) | |
| Test a GCC-style deps log with multiple outputs using a line per output. More... | |
| TEST_F (BuildWithQueryDepsLogTest, TwoOutputsDepFileGCCOneLine) | |
| Test a GCC-style deps log with multiple outputs. More... | |
| TEST_F (BuildWithQueryDepsLogTest, TwoOutputsDepFileGCCOnlyMainOutput) | |
| Test a GCC-style deps log with multiple outputs mentioning only the main output. More... | |
| TEST_F (BuildWithQueryDepsLogTest, TwoOutputsDepFileGCCOnlySecondaryOutput) | |
| Test a GCC-style deps log with multiple outputs mentioning only the secondary output. More... | |
| TEST_F (BuildWithQueryDepsLogTest, TwoOutputsDepFileMSVC) | |
| Test a MSVC-style deps log with multiple outputs. More... | |
| TEST_F (PlanTest, Basic) | |
| TEST_F (PlanTest, ConsolePool) | |
| TEST_F (PlanTest, DoubleDependent) | |
| TEST_F (PlanTest, DoubleOutputDirect) | |
| TEST_F (PlanTest, DoubleOutputIndirect) | |
| TEST_F (PlanTest, PoolsWithDepthTwo) | |
| TEST_F (PlanTest, PoolWithDepthOne) | |
| TEST_F (PlanTest, PoolWithFailingEdge) | |
| TEST_F (PlanTest, PoolWithRedundantEdges) | |
| TEST_F (PlanTest, PriorityWithoutBuildLog) | |
| void | TestPhonyUseCase (BuildTest *t, int i) |
| TEST_F | ( | BuildDryRun | , |
| AllCommandsShown | |||
| ) |
Definition at line 1999 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildDryRun | , |
| WithDyndep | |||
| ) |
Definition at line 2028 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| Chain | |||
| ) |
Definition at line 932 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| Console | |||
| ) |
Definition at line 3335 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DepFileMissing | |||
| ) |
Definition at line 1012 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| DepFileOK | |||
| ) |
Definition at line 1025 of file build_test.cc.
References AssertParse(), Edge::EvaluateCommand(), and Edge::inputs_.
| TEST_F | ( | BuildTest | , |
| DepFileParseError | |||
| ) |
Definition at line 1061 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| DepsGccWithEmptyDepfileErrorsOut | |||
| ) |
Definition at line 2267 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| DyndepBuild | |||
| ) |
Definition at line 3434 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverCircular | |||
| ) |
Definition at line 3859 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverImplicitConnection | |||
| ) |
Definition at line 3721 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNewInput | |||
| ) |
Definition at line 3628 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNewInputWithTransitiveValidation | |||
| ) |
Definition at line 3687 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNewInputWithValidation | |||
| ) |
Definition at line 3660 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNewOutput | |||
| ) |
Definition at line 3526 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNewOutputWithMultipleRules1 | |||
| ) |
Definition at line 3557 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNewOutputWithMultipleRules2 | |||
| ) |
Definition at line 3588 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNowWantEdge | |||
| ) |
Definition at line 3795 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverNowWantEdgeAndDependent | |||
| ) |
Definition at line 3828 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverOutputAndDepfileInput | |||
| ) |
Definition at line 3753 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildDiscoverScheduledEdge | |||
| ) |
Definition at line 3943 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepBuildSyntaxError | |||
| ) |
Definition at line 3470 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| DyndepBuildUnrelatedOutput | |||
| ) |
Definition at line 3494 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepMissingAndNoRule | |||
| ) |
Definition at line 3352 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| DyndepReadyCircular | |||
| ) |
Definition at line 3413 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| DyndepReadyImplicitConnection | |||
| ) |
Definition at line 3367 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepReadySyntaxError | |||
| ) |
Definition at line 3395 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| DyndepTwoLevelDirect | |||
| ) |
Definition at line 3991 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepTwoLevelDiscoveredDirty | |||
| ) |
Definition at line 4124 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepTwoLevelDiscoveredReady | |||
| ) |
Definition at line 4083 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| DyndepTwoLevelIndirect | |||
| ) |
Definition at line 4038 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| EncounterReadyTwice | |||
| ) |
Definition at line 1072 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| Fail | |||
| ) |
Definition at line 1433 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| FailedDepsParse | |||
| ) |
Definition at line 2314 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| ImplicitOutput | |||
| ) |
Definition at line 896 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| InterruptCleanup | |||
| ) |
Definition at line 2192 of file build_test.cc.
References AssertParse(), and ExitInterrupted.
| TEST_F | ( | BuildTest | , |
| MakeDirs | |||
| ) |
Definition at line 992 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| MissingInput | |||
| ) |
Definition at line 968 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| MissingInputTarget | |||
| ) |
Definition at line 984 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| MissingTarget | |||
| ) |
Definition at line 977 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| MultiOutIn | |||
| ) |
Definition at line 914 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| NoWork | |||
| ) |
Definition at line 815 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| OneStep | |||
| ) |
Definition at line 820 of file build_test.cc.
References ExitSuccess.
| TEST_F | ( | BuildTest | , |
| OneStep2 | |||
| ) |
Definition at line 834 of file build_test.cc.
References ExitSuccess.
| TEST_F | ( | BuildTest | , |
| OrderOnlyDeps | |||
| ) |
Definition at line 1095 of file build_test.cc.
References AssertParse(), Edge::EvaluateCommand(), ExitSuccess, Edge::implicit_deps_, Edge::inputs_, and Edge::order_only_deps_.
| TEST_F | ( | BuildTest | , |
| Phony | |||
| ) |
Definition at line 1243 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| PhonyNoWork | |||
| ) |
Definition at line 1260 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| PhonySelfReference | |||
| ) |
Definition at line 1276 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| PhonyUseCase1 | |||
| ) |
Definition at line 1426 of file build_test.cc.
References TestPhonyUseCase().
| TEST_F | ( | BuildTest | , |
| PhonyUseCase2 | |||
| ) |
Definition at line 1427 of file build_test.cc.
References TestPhonyUseCase().
| TEST_F | ( | BuildTest | , |
| PhonyUseCase3 | |||
| ) |
Definition at line 1428 of file build_test.cc.
References TestPhonyUseCase().
| TEST_F | ( | BuildTest | , |
| PhonyUseCase4 | |||
| ) |
Definition at line 1429 of file build_test.cc.
References TestPhonyUseCase().
| TEST_F | ( | BuildTest | , |
| PhonyUseCase5 | |||
| ) |
Definition at line 1430 of file build_test.cc.
References TestPhonyUseCase().
| TEST_F | ( | BuildTest | , |
| PhonyUseCase6 | |||
| ) |
Definition at line 1431 of file build_test.cc.
References TestPhonyUseCase().
| TEST_F | ( | BuildTest | , |
| PhonyWithNoInputs | |||
| ) |
Definition at line 2241 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| PoolEdgesReadyButNotWanted | |||
| ) |
Definition at line 1514 of file build_test.cc.
References Pool::current_use(), and State::LookupPool().
| TEST_F | ( | BuildTest | , |
| RebuildOrderOnlyDeps | |||
| ) |
Definition at line 1165 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| RestatDepfileDependency | |||
| ) |
Check that a restat rule generating a header cancels compilations correctly.
Definition at line 2940 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| RestatMissingDepfile | |||
| ) |
Check that a restat rule doesn't clear an edge if the depfile is missing.
Follows from: https://github.com/ninja-build/ninja/issues/603
Definition at line 3237 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| RspFileFailure | |||
| ) |
Definition at line 2106 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| RspFileSuccess | |||
| ) |
Definition at line 2053 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| StatFailureAbortsBuild | |||
| ) |
Definition at line 2226 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| StatusFormatElapsed_e | |||
| ) |
Definition at line 2285 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| StatusFormatElapsed_w | |||
| ) |
Definition at line 2291 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| StatusFormatETA | |||
| ) |
Definition at line 2297 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| StatusFormatReplacePlaceholder | |||
| ) |
Definition at line 2309 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| StatusFormatTimeProgress | |||
| ) |
Definition at line 2303 of file build_test.cc.
| TEST_F | ( | BuildTest | , |
| SwallowFailures | |||
| ) |
Definition at line 1448 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| SwallowFailuresLimit | |||
| ) |
Definition at line 1469 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| SwallowFailuresPool | |||
| ) |
Definition at line 1490 of file build_test.cc.
References AssertParse(), and ExitFailure.
| TEST_F | ( | BuildTest | , |
| TwoOutputs | |||
| ) |
Definition at line 879 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| TwoStep | |||
| ) |
Definition at line 848 of file build_test.cc.
References ExitSuccess.
| TEST_F | ( | BuildTest | , |
| Validation | |||
| ) |
Definition at line 4165 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| ValidationCircular | |||
| ) |
Definition at line 4346 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| ValidationDependsOnOutput | |||
| ) |
Definition at line 4217 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildTest | , |
| ValidationWithCircularDependency | |||
| ) |
Definition at line 4396 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildTest | , |
| WrongOutputInDepfileCausesRebuild | |||
| ) |
Definition at line 3315 of file build_test.cc.
References ScopedFilePath::c_str().
| TEST_F | ( | BuildWithDepsLogTest | , |
| DepFileOKDepsLog | |||
| ) |
Definition at line 3026 of file build_test.cc.
References Builder::AddTarget(), AssertParse(), Builder::Build(), DepsLog::Close(), Builder::command_runner_, State::edges_, Edge::EvaluateCommand(), ExitSuccess, State::GetNode(), Edge::inputs_, DepsLog::Load(), Node::MarkDirty(), and DepsLog::OpenForWrite().
| TEST_F | ( | BuildWithDepsLogTest | , |
| DepsIgnoredInDryRun | |||
| ) |
Definition at line 2706 of file build_test.cc.
References Builder::AddTarget(), AssertParse(), Builder::Build(), Builder::command_runner_, and ExitSuccess.
| TEST_F | ( | BuildWithDepsLogTest | , |
| DiscoveredDepDuringBuildChanged | |||
| ) |
Definition at line 3087 of file build_test.cc.
References Builder::AddTarget(), Builder::AlreadyUpToDate(), AssertParse(), Builder::Build(), DepsLog::Close(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), and DepsLog::OpenForWrite().
| TEST_F | ( | BuildWithDepsLogTest | , |
| ObsoleteDeps | |||
| ) |
Verify that obsolete dependency info causes a rebuild.
1) Run a successful build where everything has time t, record deps. 2) Move input/output to time t+1 – despite files in alignment, should still need to rebuild due to deps at older time.
Definition at line 2636 of file build_test.cc.
References Builder::AddTarget(), AssertParse(), Builder::Build(), DepsLog::Close(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), and DepsLog::OpenForWrite().
| TEST_F | ( | BuildWithDepsLogTest | , |
| RestatDepfileDependencyDepsLog | |||
| ) |
Check that a restat rule generating a header cancels compilations correctly, depslog case.
Definition at line 2963 of file build_test.cc.
References Builder::AddTarget(), AssertParse(), Builder::Build(), DepsLog::Close(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), and DepsLog::OpenForWrite().
| TEST_F | ( | BuildWithDepsLogTest | , |
| RestatMissingDepfileDepslog | |||
| ) |
Check that a restat rule doesn't clear an edge if the deps are missing.
https://github.com/ninja-build/ninja/issues/603
Definition at line 3261 of file build_test.cc.
References ScopedFilePath::c_str().
| TEST_F | ( | BuildWithDepsLogTest | , |
| Straightforward | |||
| ) |
Run a straightforward build where the deps log is used.
Definition at line 2568 of file build_test.cc.
References Builder::AddTarget(), AssertParse(), Builder::Build(), DepsLog::Close(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), and DepsLog::OpenForWrite().
| TEST_F | ( | BuildWithDepsLogTest | , |
| TestInputMtimeRaceCondition | |||
| ) |
Definition at line 2735 of file build_test.cc.
References Builder::AddTarget(), Builder::AlreadyUpToDate(), AssertParse(), Builder::Build(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), BuildLog::Load(), BuildLog::LookupByOutput(), BuildLog::LogEntry::mtime, BuildLog::OpenForWrite(), DepsLog::OpenForWrite(), and State::Reset().
| TEST_F | ( | BuildWithDepsLogTest | , |
| TestInputMtimeRaceConditionWithDepFile | |||
| ) |
Definition at line 2814 of file build_test.cc.
References Builder::AddTarget(), Builder::AlreadyUpToDate(), AssertParse(), Builder::Build(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), BuildLog::Load(), BuildLog::LookupByOutput(), BuildLog::LogEntry::mtime, BuildLog::OpenForWrite(), DepsLog::OpenForWrite(), and State::Reset().
| TEST_F | ( | BuildWithDepsLogTest | , |
| ValidationThroughDepfile | |||
| ) |
Definition at line 4267 of file build_test.cc.
References Builder::AddTarget(), AssertParse(), Builder::Build(), DepsLog::Close(), Builder::command_runner_, ExitSuccess, DepsLog::Load(), and DepsLog::OpenForWrite().
| TEST_F | ( | BuildWithLogTest | , |
| DyndepBuildDiscoverRestat | |||
| ) |
Definition at line 3893 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| GeneratedPlainDepfileMtime | |||
| ) |
Definition at line 1966 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| ImplicitGeneratedOutOfDate | |||
| ) |
Definition at line 1547 of file build_test.cc.
References AssertParse().
| TEST_F | ( | BuildWithLogTest | , |
| ImplicitGeneratedOutOfDate2 | |||
| ) |
Definition at line 1565 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| NotInLogButOnDisk | |||
| ) |
Definition at line 1619 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| RebuildAfterFailure | |||
| ) |
Definition at line 1644 of file build_test.cc.
References AssertParse(), ExitFailure, and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| RebuildWithNoInputs | |||
| ) |
Definition at line 1689 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| RestatInputChangesDueToRule | |||
| ) |
Definition at line 1920 of file build_test.cc.
References AssertParse(), ExitSuccess, and BuildLog::LogEntry::mtime.
| TEST_F | ( | BuildWithLogTest | , |
| RestatMissingFile | |||
| ) |
Definition at line 1785 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| RestatMissingInput | |||
| ) |
Definition at line 1868 of file build_test.cc.
References AssertParse(), ExitSuccess, and BuildLog::LogEntry::mtime.
| TEST_F | ( | BuildWithLogTest | , |
| RestatSingleDependentOutputDirty | |||
| ) |
Definition at line 1826 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| RestatTest | |||
| ) |
Definition at line 1720 of file build_test.cc.
References AssertParse(), and ExitSuccess.
| TEST_F | ( | BuildWithLogTest | , |
| RspFileCmdLineChange | |||
| ) |
Definition at line 2146 of file build_test.cc.
References AssertHash(), AssertParse(), BuildLog::LogEntry::command_hash, and ExitSuccess.
| TEST_F | ( | BuildWithQueryDepsLogTest | , |
| TwoOutputsDepFileGCCMultiLineInput | |||
| ) |
Test a GCC-style deps log with multiple outputs using a line per input.
Definition at line 2416 of file build_test.cc.
References AssertParse(), ExitSuccess, DepsLog::Deps::node_count, DepsLog::Deps::nodes, and Node::path().
| TEST_F | ( | BuildWithQueryDepsLogTest | , |
| TwoOutputsDepFileGCCMultiLineOutput | |||
| ) |
Test a GCC-style deps log with multiple outputs using a line per output.
Definition at line 2447 of file build_test.cc.
References AssertParse(), ExitSuccess, DepsLog::Deps::node_count, DepsLog::Deps::nodes, and Node::path().
| TEST_F | ( | BuildWithQueryDepsLogTest | , |
| TwoOutputsDepFileGCCOneLine | |||
| ) |
Test a GCC-style deps log with multiple outputs.
Definition at line 2385 of file build_test.cc.
References AssertParse(), ExitSuccess, DepsLog::Deps::node_count, DepsLog::Deps::nodes, and Node::path().
| TEST_F | ( | BuildWithQueryDepsLogTest | , |
| TwoOutputsDepFileGCCOnlyMainOutput | |||
| ) |
Test a GCC-style deps log with multiple outputs mentioning only the main output.
Definition at line 2478 of file build_test.cc.
References AssertParse(), ExitSuccess, DepsLog::Deps::node_count, DepsLog::Deps::nodes, and Node::path().
| TEST_F | ( | BuildWithQueryDepsLogTest | , |
| TwoOutputsDepFileGCCOnlySecondaryOutput | |||
| ) |
Test a GCC-style deps log with multiple outputs mentioning only the secondary output.
Definition at line 2509 of file build_test.cc.
References AssertParse(), ExitSuccess, DepsLog::Deps::node_count, DepsLog::Deps::nodes, and Node::path().
| TEST_F | ( | BuildWithQueryDepsLogTest | , |
| TwoOutputsDepFileMSVC | |||
| ) |
Test a MSVC-style deps log with multiple outputs.
Definition at line 2357 of file build_test.cc.
References AssertParse(), ExitSuccess, DepsLog::Deps::node_count, DepsLog::Deps::nodes, and Node::path().
| TEST_F | ( | PlanTest | , |
| Basic | |||
| ) |
Definition at line 67 of file build_test.cc.
References AssertParse(), Edge::inputs_, Plan::kEdgeSucceeded, and Edge::outputs_.
| TEST_F | ( | PlanTest | , |
| ConsolePool | |||
| ) |
Definition at line 253 of file build_test.cc.
| TEST_F | ( | PlanTest | , |
| DoubleDependent | |||
| ) |
Definition at line 166 of file build_test.cc.
References AssertParse(), and Plan::kEdgeSucceeded.
| TEST_F | ( | PlanTest | , |
| DoubleOutputDirect | |||
| ) |
Definition at line 100 of file build_test.cc.
References AssertParse(), and Plan::kEdgeSucceeded.
| TEST_F | ( | PlanTest | , |
| DoubleOutputIndirect | |||
| ) |
Definition at line 126 of file build_test.cc.
References AssertParse(), and Plan::kEdgeSucceeded.
| TEST_F | ( | PlanTest | , |
| PoolsWithDepthTwo | |||
| ) |
Definition at line 262 of file build_test.cc.
References AssertParse(), Edge::inputs_, Plan::kEdgeSucceeded, and Edge::outputs_.
| TEST_F | ( | PlanTest | , |
| PoolWithDepthOne | |||
| ) |
Definition at line 242 of file build_test.cc.
| TEST_F | ( | PlanTest | , |
| PoolWithFailingEdge | |||
| ) |
Definition at line 424 of file build_test.cc.
References AssertParse(), Edge::inputs_, Plan::kEdgeFailed, and Edge::outputs_.
| TEST_F | ( | PlanTest | , |
| PoolWithRedundantEdges | |||
| ) |
Definition at line 342 of file build_test.cc.
References AssertParse(), Edge::inputs_, Plan::kEdgeSucceeded, and Edge::outputs_.
| TEST_F | ( | PlanTest | , |
| PriorityWithoutBuildLog | |||
| ) |
Definition at line 469 of file build_test.cc.
References AssertParse(), Plan::kEdgeSucceeded, and Edge::outputs_.
| void TestPhonyUseCase | ( | BuildTest * | t, |
| int | i | ||
| ) |
Definition at line 1306 of file build_test.cc.
References Builder::AddTarget(), Builder::AlreadyUpToDate(), AssertParse(), Builder::Build(), BuildTest::builder_, Builder::command_runner_, BuildTest::command_runner_, FakeCommandRunner::commands_ran_, VirtualFileSystem::Create(), Node::dirty(), Node::exists(), ExitSuccess, BuildTest::fs_, StateTestWithBuiltinRules::GetNode(), Node::mtime(), VirtualFileSystem::now_, State::Reset(), Node::Stat(), StateTestWithBuiltinRules::state_, and VirtualFileSystem::Tick().
Referenced by TEST_F().