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

Unified Diff: tools/gn/ninja_script_target_writer_unittest.cc

Issue 26267003: Add the concept of a source set to GN. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 2 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tools/gn/ninja_helper.cc ('k') | tools/gn/ninja_target_writer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tools/gn/ninja_script_target_writer_unittest.cc
diff --git a/tools/gn/ninja_script_target_writer_unittest.cc b/tools/gn/ninja_script_target_writer_unittest.cc
index 9fa018e5b9269fabdd8fb6a6d9344443eb46b9c3..2057f072ce5582970c008f9f776dd48dca148935 100644
--- a/tools/gn/ninja_script_target_writer_unittest.cc
+++ b/tools/gn/ninja_script_target_writer_unittest.cc
@@ -113,6 +113,10 @@ TEST(NinjaScriptTargetWriter, InvokeOverSources) {
// Windows.
{
+ // Note: we use forward slashes here so that the output will be the same on
+ // Linux and Windows.
+ setup.build_settings()->set_python_path(base::FilePath(FILE_PATH_LITERAL(
+ "C:/python/python.exe")));
setup.settings()->set_target_os(Settings::WIN);
std::ostringstream out;
@@ -124,11 +128,11 @@ TEST(NinjaScriptTargetWriter, InvokeOverSources) {
const char expected_win[] =
"arch = environment.x86\n"
"rule __foo_bar___rule\n"
- " command = $pythonpath gyp-win-tool action-wrapper $arch __foo_bar___rule.$unique_name.rsp\n"
+ " command = C:/python/python.exe gyp-win-tool action-wrapper $arch __foo_bar___rule.$unique_name.rsp\n"
" description = CUSTOM //foo:bar()\n"
" restat = 1\n"
" rspfile = __foo_bar___rule.$unique_name.rsp\n"
- " rspfile_content = $pythonpath ../../foo/script.py -i ${source} \"--out=foo$ bar${source_name_part}.o\"\n"
+ " rspfile_content = C:/python/python.exe ../../foo/script.py -i ${source} \"--out=foo$ bar${source_name_part}.o\"\n"
"\n"
"build input1.out: __foo_bar___rule../../foo/input1.txt | ../../foo/included.txt\n"
" unique_name = 0\n"
« no previous file with comments | « tools/gn/ninja_helper.cc ('k') | tools/gn/ninja_target_writer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698