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

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

Issue 2101923006: Fix BundleData::GetBundleRootDirOutput() for non-default toolchain. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@create-bundle-deps
Patch Set: Rebase. Created 4 years, 5 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
« no previous file with comments | « tools/gn/ninja_group_target_writer_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/test_with_scope.h" 5 #include "tools/gn/test_with_scope.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/bind.h" 9 #include "base/bind.h"
10 #include "tools/gn/parser.h" 10 #include "tools/gn/parser.h"
11 #include "tools/gn/tokenizer.h" 11 #include "tools/gn/tokenizer.h"
12 12
13 namespace {
14
15 BuildSettings CreateBuildSettingsForTest() {
16 BuildSettings build_settings;
17 build_settings.SetBuildDir(SourceDir("//out/Debug/"));
18 return build_settings;
19 }
20
21 } // namespace
22
13 TestWithScope::TestWithScope() 23 TestWithScope::TestWithScope()
14 : build_settings_(), 24 : build_settings_(CreateBuildSettingsForTest()),
15 settings_(&build_settings_, std::string()), 25 settings_(&build_settings_, std::string()),
16 toolchain_(&settings_, Label(SourceDir("//toolchain/"), "default")), 26 toolchain_(&settings_, Label(SourceDir("//toolchain/"), "default")),
17 scope_(&settings_), 27 scope_(&settings_),
18 scope_progammatic_provider_(&scope_, true) { 28 scope_progammatic_provider_(&scope_, true) {
19 build_settings_.SetBuildDir(SourceDir("//out/Debug/"));
20 build_settings_.set_print_callback( 29 build_settings_.set_print_callback(
21 base::Bind(&TestWithScope::AppendPrintOutput, base::Unretained(this))); 30 base::Bind(&TestWithScope::AppendPrintOutput, base::Unretained(this)));
22 31
23 settings_.set_toolchain_label(toolchain_.label()); 32 settings_.set_toolchain_label(toolchain_.label());
24 settings_.set_default_toolchain_label(toolchain_.label()); 33 settings_.set_default_toolchain_label(toolchain_.label());
25 34
26 SetupToolchain(&toolchain_); 35 SetupToolchain(&toolchain_);
27 scope_.set_item_collector(&items_); 36 scope_.set_item_collector(&items_);
28 } 37 }
29 38
(...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after
206 const std::string& label_string, 215 const std::string& label_string,
207 Target::OutputType type) 216 Target::OutputType type)
208 : Target(setup.settings(), setup.ParseLabel(label_string)) { 217 : Target(setup.settings(), setup.ParseLabel(label_string)) {
209 visibility().SetPublic(); 218 visibility().SetPublic();
210 set_output_type(type); 219 set_output_type(type);
211 SetToolchain(setup.toolchain()); 220 SetToolchain(setup.toolchain());
212 } 221 }
213 222
214 TestTarget::~TestTarget() { 223 TestTarget::~TestTarget() {
215 } 224 }
OLDNEW
« no previous file with comments | « tools/gn/ninja_group_target_writer_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698