Lines Matching defs:edge
47 Edge* edge = plan_.FindWork();
48 ASSERT_TRUE(edge);
49 ret->push_back(edge);
70 Edge* edge = plan_.FindWork();
71 ASSERT_TRUE(edge);
72 ASSERT_EQ("in", edge->inputs_[0]->path());
73 ASSERT_EQ("mid", edge->outputs_[0]->path());
77 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
80 edge = plan_.FindWork();
81 ASSERT_TRUE(edge);
82 ASSERT_EQ("mid", edge->inputs_[0]->path());
83 ASSERT_EQ("out", edge->outputs_[0]->path());
85 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
89 edge = plan_.FindWork();
90 ASSERT_EQ(0, edge);
106 Edge* edge;
107 edge = plan_.FindWork();
108 ASSERT_TRUE(edge); // cat in
110 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
113 edge = plan_.FindWork();
114 ASSERT_TRUE(edge); // cat mid1 mid2
115 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
118 edge = plan_.FindWork();
119 ASSERT_FALSE(edge); // done
139 Edge* edge;
140 edge = plan_.FindWork();
141 ASSERT_TRUE(edge); // cat in
142 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
145 edge = plan_.FindWork();
146 ASSERT_TRUE(edge); // cat a1
147 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
150 edge = plan_.FindWork();
151 ASSERT_TRUE(edge); // cat a2
152 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
155 edge = plan_.FindWork();
156 ASSERT_TRUE(edge); // cat b1 b2
157 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
160 edge = plan_.FindWork();
161 ASSERT_FALSE(edge); // done
180 Edge* edge;
181 edge = plan_.FindWork();
182 ASSERT_TRUE(edge); // cat in
183 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
186 edge = plan_.FindWork();
187 ASSERT_TRUE(edge); // cat mid
188 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
191 edge = plan_.FindWork();
192 ASSERT_TRUE(edge); // cat mid
193 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
196 edge = plan_.FindWork();
197 ASSERT_TRUE(edge); // cat a1 a2
198 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
201 edge = plan_.FindWork();
202 ASSERT_FALSE(edge); // done
216 Edge* edge = plan_.FindWork();
217 ASSERT_TRUE(edge);
218 ASSERT_EQ("in", edge->inputs_[0]->path());
219 ASSERT_EQ("out1", edge->outputs_[0]->path());
224 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
227 edge = plan_.FindWork();
228 ASSERT_TRUE(edge);
229 ASSERT_EQ("in", edge->inputs_[0]->path());
230 ASSERT_EQ("out2", edge->outputs_[0]->path());
234 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
238 edge = plan_.FindWork();
239 ASSERT_EQ(0, edge);
297 Edge *edge = edges[i];
298 ASSERT_EQ("in", edge->inputs_[0]->path());
300 ASSERT_EQ(base_name + string(1, '1' + (i % 2)), edge->outputs_[0]->path());
304 Edge* edge = edges[4];
305 ASSERT_TRUE(edge);
306 ASSERT_EQ("in", edge->inputs_[0]->path());
307 ASSERT_EQ("outb3", edge->outputs_[0]->path());
372 Edge* edge = NULL;
377 edge = initial_edges[1]; // Foo first
378 ASSERT_EQ("foo.cpp", edge->outputs_[0]->path());
379 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
382 edge = plan_.FindWork();
383 ASSERT_TRUE(edge);
385 ASSERT_EQ("foo.cpp", edge->inputs_[0]->path());
386 ASSERT_EQ("foo.cpp", edge->inputs_[1]->path());
387 ASSERT_EQ("foo.cpp.obj", edge->outputs_[0]->path());
388 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
391 edge = initial_edges[0]; // Now for bar
392 ASSERT_EQ("bar.cpp", edge->outputs_[0]->path());
393 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
396 edge = plan_.FindWork();
397 ASSERT_TRUE(edge);
399 ASSERT_EQ("bar.cpp", edge->inputs_[0]->path());
400 ASSERT_EQ("bar.cpp", edge->inputs_[1]->path());
401 ASSERT_EQ("bar.cpp.obj", edge->outputs_[0]->path());
402 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
405 edge = plan_.FindWork();
406 ASSERT_TRUE(edge);
408 ASSERT_EQ("foo.cpp.obj", edge->inputs_[0]->path());
409 ASSERT_EQ("bar.cpp.obj", edge->inputs_[1]->path());
410 ASSERT_EQ("libfoo.a", edge->outputs_[0]->path());
411 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
414 edge = plan_.FindWork();
415 ASSERT_TRUE(edge);
417 ASSERT_EQ("libfoo.a", edge->inputs_[0]->path());
418 ASSERT_EQ("all", edge->outputs_[0]->path());
419 plan_.EdgeFinished(edge, Plan::kEdgeSucceeded, &err);
422 edge = plan_.FindWork();
423 ASSERT_FALSE(edge);
445 Edge* edge = plan_.FindWork();
446 ASSERT_TRUE(edge);
447 ASSERT_EQ("in", edge->inputs_[0]->path());
448 ASSERT_EQ("out1", edge->outputs_[0]->path());
453 plan_.EdgeFinished(edge, Plan::kEdgeFailed, &err);
456 edge = plan_.FindWork();
457 ASSERT_TRUE(edge);
458 ASSERT_EQ("in", edge->inputs_[0]->path());
459 ASSERT_EQ("out2", edge->outputs_[0]->path());
463 plan_.EdgeFinished(edge, Plan::kEdgeFailed, &err);
467 edge = plan_.FindWork();
468 ASSERT_EQ(0, edge);
478 virtual bool StartCommand(Edge* edge);
585 bool FakeCommandRunner::StartCommand(Edge* edge) {
587 assert(find(active_edges_.begin(), active_edges_.end(), edge)
589 commands_ran_.push_back(edge->EvaluateCommand());
590 if (edge->rule().name() == "cat" ||
591 edge->rule().name() == "cat_rsp" ||
592 edge->rule().name() == "cat_rsp_out" ||
593 edge->rule().name() == "cc" ||
594 edge->rule().name() == "cp_multi_msvc" ||
595 edge->rule().name() == "cp_multi_gcc" ||
596 edge->rule().name() == "touch" ||
597 edge->rule().name() == "touch-interrupt" ||
598 edge->rule().name() == "touch-fail-tick2") {
599 for (vector<Node*>::iterator out = edge->outputs_.begin();
600 out != edge->outputs_.end(); ++out) {
603 } else if (edge->rule().name() == "true" ||
604 edge->rule().name() == "fail" ||
605 edge->rule().name() == "interrupt" ||
606 edge->rule().name() == "console") {
608 } else if (edge->rule().name() == "cp") {
609 assert(!edge->inputs_.empty());
610 assert(edge->outputs_.size() == 1);
613 if (fs_->ReadFile(edge->inputs_[0]->path(), &content, &err) ==
615 fs_->WriteFile(edge->outputs_[0]->path(), content);
616 } else if (edge->rule().name() == "touch-implicit-dep-out") {
617 string dep = edge->GetBinding("test_dependency");
621 for (vector<Node*>::iterator out = edge->outputs_.begin();
622 out != edge->outputs_.end(); ++out) {
625 } else if (edge->rule().name() == "touch-out-implicit-dep") {
626 string dep = edge->GetBinding("test_dependency");
627 for (vector<Node*>::iterator out = edge->outputs_.begin();
628 out != edge->outputs_.end(); ++out) {
633 } else if (edge->rule().name() == "generate-depfile") {
634 string dep = edge->GetBinding("test_dependency");
635 bool touch_dep = edge->GetBindingBool("touch_dependency");
636 string depfile = edge->GetUnescapedDepfile();
642 for (vector<Node*>::iterator out = edge->outputs_.begin();
643 out != edge->outputs_.end(); ++out) {
648 } else if (edge->rule().name() == "long-cc") {
649 string dep = edge->GetBinding("test_dependency");
650 string depfile = edge->GetUnescapedDepfile();
652 for (vector<Node*>::iterator out = edge->outputs_.begin();
653 out != edge->outputs_.end(); ++out) {
667 active_edges_.push_back(edge);
681 // so we can pick any edge here. Pick the last edge. Tests can
685 Edge* edge = *edge_iter;
686 result->edge = edge;
688 if (edge->rule().name() == "interrupt" ||
689 edge->rule().name() == "touch-interrupt") {
694 if (edge->rule().name() == "console") {
695 if (edge->use_console())
703 if (edge->rule().name() == "cp_multi_msvc") {
704 const std::string prefix = edge->GetBinding("msvc_deps_prefix");
705 for (std::vector<Node*>::iterator in = edge->inputs_.begin();
706 in != edge->inputs_.end(); ++in) {
711 if (edge->rule().name() == "fail" ||
712 (edge->rule().name() == "touch-fail-tick2" && fs_->now_ == 2))
721 if (edge->rule().name() == "long-cc") {
722 string dep = edge->GetBinding("test_dependency");
729 // Provide a way for test cases to verify when an edge finishes that
730 // some other edge is still active. This is useful for test cases
732 const string& verify_active_edge = edge->GetBinding("verify_active_edge");
983 Edge* edge = state_.edges_.back();
993 // Expect one new edge generating foo.o. Loading the depfile should have
1006 // Expect our edge to now have three inputs: foo.c and two headers.
1007 ASSERT_EQ(3u, edge->inputs_.size());
1010 ASSERT_EQ("cc foo.c", edge->EvaluateCommand());
1052 Edge* edge = state_.edges_.back();
1061 ASSERT_EQ(4u, edge->inputs_.size());
1062 EXPECT_EQ(2, edge->implicit_deps_);
1063 EXPECT_EQ(1, edge->order_only_deps_);
1066 EXPECT_EQ("foo.c", edge->inputs_[0]->path());
1067 EXPECT_EQ("blah.h", edge->inputs_[1]->path());
1068 EXPECT_EQ("bar.h", edge->inputs_[2]->path());
1069 EXPECT_EQ("otherfile", edge->inputs_[3]->path());
1072 ASSERT_EQ("cc foo.c", edge->EvaluateCommand());
1183 // Expect one new edge enerating foo.o.
1185 // Expect our edge to now have three inputs: foo.c and two headers.
1186 Edge* edge = state_.edges_.back();
1187 ASSERT_EQ(3u, edge->inputs_.size());
1191 ASSERT_EQ("cc x\\y/z\\foo.c", edge->EvaluateCommand());
1240 // 1. output edge does not exist, inputs are not real
1241 // 2. output edge does not exist, no inputs
1242 // 3. output edge does not exist, inputs are real, newest mtime is M
1243 // 4. output edge is real, inputs are not real
1244 // 5. output edge is real, no inputs
1245 // 6. output edge is real, inputs are real, newest mtime is M
1331 // Second build, expect testN edge to be rebuilt
1806 // "true" rule should not lead to the "touch" edge writing out2 and out3 being
2995 Edge* edge = state.edges_.back();
3001 // Expect one new edge generating fo o.o, loading the depfile should
3004 // Expect our edge to now have three inputs: foo.c and two headers.
3005 ASSERT_EQ(3u, edge->inputs_.size());
3008 ASSERT_EQ("cc foo.c", edge->EvaluateCommand());
3147 // Expect one new edge generating fo o.o.
3149 // Expect our edge to now have three inputs: foo.c and two headers.
3150 Edge* edge = state.edges_.back();
3151 ASSERT_EQ(3u, edge->inputs_.size());
3155 ASSERT_EQ("cc x\\y/z\\foo.c", edge->EvaluateCommand());
3163 /// Check that a restat rule doesn't clear an edge if the depfile is missing.
3187 /// Check that a restat rule doesn't clear an edge if the deps are missing.
3297 // that one edge has an implicit output that is also an implicit
3298 // input of another edge.
3456 // a new output of an edge.
3487 // a new output of an edge that is already the output of another edge.
3518 // a new output of an edge that is already the output of another
3519 // edge also discovered by dyndep.
3558 // a new input to an edge.
3617 // a new input to an edge that has a validation edge.
3651 // that one edge has an implicit output that is also an implicit
3652 // input of another edge.
3683 // that one edge has an implicit output that is also reported by
3684 // a depfile as an input of another edge.
3706 // Loading the depfile did not give tmp.imp a phony input edge.
3712 // Loading the dyndep file gave tmp.imp a real input edge.
3725 // that an edge is actually wanted due to a missing implicit output.
3758 // that an edge and a dependent are actually wanted.
3823 // that an edge has a restat binding.
3873 // new input that itself is an output from an edge that has already
3892 // while another edge is still active.
3898 // and we will load the dyndep file while the edge for "out1" is
3900 // also produced by the active edge. The builder should not
3901 // re-schedule the already-active edge.
3967 // Verify that dyndep files can add to an edge new implicit inputs that
4013 // edge also has a dyndep file that is ready to load immediately.
4054 // edge also has a dyndep file that needs to be built.