@@ -535,12 +535,12 @@ struct FakeCommandRunner : public CommandRunner {
535
535
536
536
struct BuildTest : public StateTestWithBuiltinRules , public BuildLogUser {
537
537
BuildTest () : config_(MakeConfig()), command_runner_(&fs_), status_(config_),
538
- builder_ (&state_, config_, NULL , NULL , &fs_, &status_, 0 ) {
538
+ builder_ (&state_, config_, NULL , NULL , NULL , &fs_, &status_, 0 ) {
539
539
}
540
540
541
541
explicit BuildTest (DepsLog* log)
542
542
: config_(MakeConfig()), command_runner_(&fs_), status_(config_),
543
- builder_(&state_, config_, NULL , log, &fs_, &status_, 0 ) {}
543
+ builder_(&state_, config_, NULL , NULL , log, &fs_, &status_, 0 ) {}
544
544
545
545
virtual void SetUp () {
546
546
StateTestWithBuiltinRules::SetUp ();
@@ -610,7 +610,7 @@ void BuildTest::RebuildTarget(const string& target, const char* manifest,
610
610
pdeps_log = &deps_log;
611
611
}
612
612
613
- Builder builder (pstate, config_, pbuild_log, pdeps_log, &fs_, &status_, 0 );
613
+ Builder builder (pstate, config_, NULL , pbuild_log, pdeps_log, &fs_, &status_, 0 );
614
614
EXPECT_TRUE (builder.AddTarget (target, &err));
615
615
616
616
command_runner_.commands_ran_ .clear ();
@@ -2559,7 +2559,7 @@ TEST_F(BuildWithDepsLogTest, Straightforward) {
2559
2559
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2560
2560
ASSERT_EQ (" " , err);
2561
2561
2562
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
2562
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
2563
2563
builder.command_runner_ .reset (&command_runner_);
2564
2564
EXPECT_TRUE (builder.AddTarget (" out" , &err));
2565
2565
ASSERT_EQ (" " , err);
@@ -2589,7 +2589,7 @@ TEST_F(BuildWithDepsLogTest, Straightforward) {
2589
2589
ASSERT_TRUE (deps_log.Load (deps_log_file_.path (), &state, &err));
2590
2590
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2591
2591
2592
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
2592
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
2593
2593
builder.command_runner_ .reset (&command_runner_);
2594
2594
command_runner_.commands_ran_ .clear ();
2595
2595
EXPECT_TRUE (builder.AddTarget (" out" , &err));
@@ -2630,7 +2630,7 @@ TEST_F(BuildWithDepsLogTest, ObsoleteDeps) {
2630
2630
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2631
2631
ASSERT_EQ (" " , err);
2632
2632
2633
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
2633
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
2634
2634
builder.command_runner_ .reset (&command_runner_);
2635
2635
EXPECT_TRUE (builder.AddTarget (" out" , &err));
2636
2636
ASSERT_EQ (" " , err);
@@ -2659,7 +2659,7 @@ TEST_F(BuildWithDepsLogTest, ObsoleteDeps) {
2659
2659
ASSERT_TRUE (deps_log.Load (deps_log_file_.path (), &state, &err));
2660
2660
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2661
2661
2662
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
2662
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
2663
2663
builder.command_runner_ .reset (&command_runner_);
2664
2664
command_runner_.commands_ran_ .clear ();
2665
2665
EXPECT_TRUE (builder.AddTarget (" out" , &err));
@@ -2695,7 +2695,7 @@ TEST_F(BuildWithDepsLogTest, DepsIgnoredInDryRun) {
2695
2695
2696
2696
// The deps log is NULL in dry runs.
2697
2697
config_.dry_run = true ;
2698
- Builder builder (&state, config_, NULL , NULL , &fs_, &status_, 0 );
2698
+ Builder builder (&state, config_, NULL , NULL , NULL , &fs_, &status_, 0 );
2699
2699
builder.command_runner_ .reset (&command_runner_);
2700
2700
command_runner_.commands_ran_ .clear ();
2701
2701
@@ -2730,7 +2730,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceCondition) {
2730
2730
2731
2731
BuildLog::LogEntry* log_entry = NULL ;
2732
2732
{
2733
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2733
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2734
2734
builder.command_runner_ .reset (&command_runner_);
2735
2735
command_runner_.commands_ran_ .clear ();
2736
2736
@@ -2750,7 +2750,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceCondition) {
2750
2750
}
2751
2751
2752
2752
{
2753
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2753
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2754
2754
builder.command_runner_ .reset (&command_runner_);
2755
2755
command_runner_.commands_ran_ .clear ();
2756
2756
@@ -2772,7 +2772,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceCondition) {
2772
2772
}
2773
2773
2774
2774
{
2775
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2775
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2776
2776
builder.command_runner_ .reset (&command_runner_);
2777
2777
command_runner_.commands_ran_ .clear ();
2778
2778
@@ -2811,7 +2811,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) {
2811
2811
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2812
2812
2813
2813
{
2814
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2814
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2815
2815
builder.command_runner_ .reset (&command_runner_);
2816
2816
2817
2817
// Run the build, out gets built, dep file is created
@@ -2832,7 +2832,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) {
2832
2832
{
2833
2833
// Trigger the build again - "out" will rebuild since its newest input mtime (header.h)
2834
2834
// is newer than the recorded mtime of out in the build log
2835
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2835
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2836
2836
builder.command_runner_ .reset (&command_runner_);
2837
2837
command_runner_.commands_ran_ .clear ();
2838
2838
@@ -2848,7 +2848,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) {
2848
2848
{
2849
2849
// Trigger the build again - "out" won't rebuild since the file wasn't updated during
2850
2850
// the previous build
2851
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2851
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2852
2852
builder.command_runner_ .reset (&command_runner_);
2853
2853
command_runner_.commands_ran_ .clear ();
2854
2854
@@ -2867,7 +2867,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) {
2867
2867
{
2868
2868
// Rebuild. This time, long-cc will cause header.h to be updated while the build is
2869
2869
// in progress
2870
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2870
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2871
2871
builder.command_runner_ .reset (&command_runner_);
2872
2872
command_runner_.commands_ran_ .clear ();
2873
2873
@@ -2883,7 +2883,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) {
2883
2883
{
2884
2884
// Rebuild. Because header.h is now in the deplog for out, it should be detectable as
2885
2885
// a change-while-in-progress and should cause a rebuild of out.
2886
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2886
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2887
2887
builder.command_runner_ .reset (&command_runner_);
2888
2888
command_runner_.commands_ran_ .clear ();
2889
2889
@@ -2899,7 +2899,7 @@ TEST_F(BuildWithDepsLogTest, TestInputMtimeRaceConditionWithDepFile) {
2899
2899
{
2900
2900
// This time, the header.h file was not updated during the build, so the target should
2901
2901
// not be considered dirty.
2902
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
2902
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
2903
2903
builder.command_runner_ .reset (&command_runner_);
2904
2904
command_runner_.commands_ran_ .clear ();
2905
2905
@@ -2957,7 +2957,7 @@ TEST_F(BuildWithDepsLogTest, RestatDepfileDependencyDepsLog) {
2957
2957
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2958
2958
ASSERT_EQ (" " , err);
2959
2959
2960
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
2960
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
2961
2961
builder.command_runner_ .reset (&command_runner_);
2962
2962
EXPECT_TRUE (builder.AddTarget (" out" , &err));
2963
2963
ASSERT_EQ (" " , err);
@@ -2983,7 +2983,7 @@ TEST_F(BuildWithDepsLogTest, RestatDepfileDependencyDepsLog) {
2983
2983
ASSERT_TRUE (deps_log.Load (deps_log_file_.path (), &state, &err));
2984
2984
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
2985
2985
2986
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
2986
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
2987
2987
builder.command_runner_ .reset (&command_runner_);
2988
2988
command_runner_.commands_ran_ .clear ();
2989
2989
EXPECT_TRUE (builder.AddTarget (" out" , &err));
@@ -3016,7 +3016,7 @@ TEST_F(BuildWithDepsLogTest, DepFileOKDepsLog) {
3016
3016
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3017
3017
ASSERT_EQ (" " , err);
3018
3018
3019
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
3019
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
3020
3020
builder.command_runner_ .reset (&command_runner_);
3021
3021
EXPECT_TRUE (builder.AddTarget (" fo o.o" , &err));
3022
3022
ASSERT_EQ (" " , err);
@@ -3037,7 +3037,7 @@ TEST_F(BuildWithDepsLogTest, DepFileOKDepsLog) {
3037
3037
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3038
3038
ASSERT_EQ (" " , err);
3039
3039
3040
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
3040
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
3041
3041
builder.command_runner_ .reset (&command_runner_);
3042
3042
3043
3043
Edge* edge = state.edges_ .back ();
@@ -3087,7 +3087,7 @@ TEST_F(BuildWithDepsLogTest, DiscoveredDepDuringBuildChanged) {
3087
3087
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3088
3088
ASSERT_EQ (" " , err);
3089
3089
3090
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
3090
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
3091
3091
builder.command_runner_ .reset (&command_runner_);
3092
3092
EXPECT_TRUE (builder.AddTarget (" out2" , &err));
3093
3093
EXPECT_FALSE (builder.AlreadyUpToDate ());
@@ -3111,7 +3111,7 @@ TEST_F(BuildWithDepsLogTest, DiscoveredDepDuringBuildChanged) {
3111
3111
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3112
3112
ASSERT_EQ (" " , err);
3113
3113
3114
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
3114
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
3115
3115
builder.command_runner_ .reset (&command_runner_);
3116
3116
EXPECT_TRUE (builder.AddTarget (" out2" , &err));
3117
3117
EXPECT_FALSE (builder.AlreadyUpToDate ());
@@ -3134,7 +3134,7 @@ TEST_F(BuildWithDepsLogTest, DiscoveredDepDuringBuildChanged) {
3134
3134
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3135
3135
ASSERT_EQ (" " , err);
3136
3136
3137
- Builder builder (&state, config_, &build_log, &deps_log, &fs_, &status_, 0 );
3137
+ Builder builder (&state, config_, NULL , &build_log, &deps_log, &fs_, &status_, 0 );
3138
3138
builder.command_runner_ .reset (&command_runner_);
3139
3139
EXPECT_TRUE (builder.AddTarget (" out2" , &err));
3140
3140
EXPECT_TRUE (builder.AlreadyUpToDate ());
@@ -3162,7 +3162,7 @@ TEST_F(BuildWithDepsLogTest, DepFileDepsLogCanonicalize) {
3162
3162
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3163
3163
ASSERT_EQ (" " , err);
3164
3164
3165
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
3165
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
3166
3166
builder.command_runner_ .reset (&command_runner_);
3167
3167
EXPECT_TRUE (builder.AddTarget (" a/b/c/d/e/fo o.o" , &err));
3168
3168
ASSERT_EQ (" " , err);
@@ -3185,7 +3185,7 @@ TEST_F(BuildWithDepsLogTest, DepFileDepsLogCanonicalize) {
3185
3185
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
3186
3186
ASSERT_EQ (" " , err);
3187
3187
3188
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
3188
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
3189
3189
builder.command_runner_ .reset (&command_runner_);
3190
3190
3191
3191
state.GetNode (" bar.h" , 0 )->MarkDirty (); // Mark bar.h as missing.
@@ -4264,7 +4264,7 @@ TEST_F(BuildWithDepsLogTest, ValidationThroughDepfile) {
4264
4264
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
4265
4265
ASSERT_EQ (" " , err);
4266
4266
4267
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
4267
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
4268
4268
builder.command_runner_ .reset (&command_runner_);
4269
4269
4270
4270
EXPECT_TRUE (builder.AddTarget (" out2" , &err));
@@ -4300,7 +4300,7 @@ TEST_F(BuildWithDepsLogTest, ValidationThroughDepfile) {
4300
4300
ASSERT_TRUE (deps_log.OpenForWrite (deps_log_file_.path (), &err));
4301
4301
ASSERT_EQ (" " , err);
4302
4302
4303
- Builder builder (&state, config_, NULL , &deps_log, &fs_, &status_, 0 );
4303
+ Builder builder (&state, config_, NULL , NULL , &deps_log, &fs_, &status_, 0 );
4304
4304
builder.command_runner_ .reset (&command_runner_);
4305
4305
4306
4306
EXPECT_TRUE (builder.AddTarget (" out2" , &err));
0 commit comments