Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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 } |
| OLD | NEW |