Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(57)

Side by Side Diff: tools/gn/ninja_binary_target_writer_unittest.cc

Issue 2071573003: GN: Use implicit dependency for binary input deps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update tests Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "tools/gn/ninja_binary_target_writer.h" 5 #include "tools/gn/ninja_binary_target_writer.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <utility> 8 #include <utility>
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
287 const char expected[] = 287 const char expected[] =
288 "defines =\n" 288 "defines =\n"
289 "include_dirs =\n" 289 "include_dirs =\n"
290 "cflags =\n" 290 "cflags =\n"
291 "cflags_cc =\n" 291 "cflags_cc =\n"
292 "root_out_dir = .\n" 292 "root_out_dir = .\n"
293 "target_out_dir = obj/foo\n" 293 "target_out_dir = obj/foo\n"
294 "target_output_name = libshlib\n" 294 "target_output_name = libshlib\n"
295 "\n" 295 "\n"
296 "build obj/foo/libshlib.input1.o: cxx ../../foo/input1.cc" 296 "build obj/foo/libshlib.input1.o: cxx ../../foo/input1.cc"
297 " || obj/foo/action.stamp\n" 297 " | obj/foo/action.stamp\n"
brettw 2016/06/16 19:41:34 Actually, we specifically don't want to change thi
Petr Hosek 2016/06/16 23:11:47 Acknowledged.
298 "build obj/foo/libshlib.input2.o: cxx ../../foo/input2.cc" 298 "build obj/foo/libshlib.input2.o: cxx ../../foo/input2.cc"
299 " || obj/foo/action.stamp\n" 299 " | obj/foo/action.stamp\n"
300 "\n" 300 "\n"
301 "build ./libshlib.so.6: solink obj/foo/libshlib.input1.o " 301 "build ./libshlib.so.6: solink obj/foo/libshlib.input1.o "
302 // The order-only dependency here is stricly unnecessary since the 302 // The order-only dependency here is stricly unnecessary since the
303 // sources list this as an order-only dep. See discussion in the code 303 // sources list this as an order-only dep. See discussion in the code
304 // that writes this. 304 // that writes this.
305 "obj/foo/libshlib.input2.o || obj/foo/action.stamp\n" 305 "obj/foo/libshlib.input2.o || obj/foo/action.stamp\n"
306 " ldflags =\n" 306 " ldflags =\n"
307 " libs =\n" 307 " libs =\n"
308 " output_extension = .so.6\n" 308 " output_extension = .so.6\n"
309 " output_dir = foo\n"; 309 " output_dir = foo\n";
(...skipping 537 matching lines...) Expand 10 before | Expand all | Expand 10 after
847 847
848 EXPECT_FALSE(scheduler.is_failed()); 848 EXPECT_FALSE(scheduler.is_failed());
849 849
850 std::ostringstream out; 850 std::ostringstream out;
851 NinjaBinaryTargetWriter writer(&target, out); 851 NinjaBinaryTargetWriter writer(&target, out);
852 writer.Run(); 852 writer.Run();
853 853
854 // Should have issued an error. 854 // Should have issued an error.
855 EXPECT_TRUE(scheduler.is_failed()); 855 EXPECT_TRUE(scheduler.is_failed());
856 } 856 }
OLDNEW
« tools/gn/ninja_binary_target_writer.cc ('K') | « tools/gn/ninja_binary_target_writer.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698