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

Unified Diff: test/msvs/external_builder/gyptest-all.py

Issue 13867004: Integrate ninja build with Visual Studio (Closed) Base URL: https://chromium.googlesource.com/external/gyp.git@master
Patch Set: with review comments Created 7 years, 8 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 | « test/msvs/external_builder/external_builder.py ('k') | test/msvs/external_builder/hello.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/msvs/external_builder/gyptest-all.py
diff --git a/test/msvs/external_builder/gyptest-all.py b/test/msvs/external_builder/gyptest-all.py
new file mode 100644
index 0000000000000000000000000000000000000000..7649dd5c7f0de03a29a95ce970339057214ceba8
--- /dev/null
+++ b/test/msvs/external_builder/gyptest-all.py
@@ -0,0 +1,56 @@
+#!/usr/bin/env python
+
+# Copyright (c) 2013 Google Inc. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+"""
+Verifies that msvs_external_builder being set will invoke the provided
+msvs_external_builder_build_cmd and msvs_external_builder_clean_cmd, and will
+not invoke MSBuild actions and rules.
+"""
+
+import os
+import TestGyp
+
+test = TestGyp.TestGyp(formats=['msvs'], workdir='workarea_all')
+
+# without the flag set
+test.run_gyp('external.gyp')
+test.build('external.gyp', target='external')
+test.must_not_exist('external_builder.out')
+test.must_exist('msbuild_rule.out')
+test.must_exist('msbuild_action.out')
+test.must_match('msbuild_rule.out', 'msbuild_rule.py hello.z a b c')
+test.must_match('msbuild_action.out', 'msbuild_action.py x y z')
+os.remove('msbuild_rule.out')
+os.remove('msbuild_action.out')
+
+# with the flag set, using Build
+try:
+ os.environ['GYP_DEFINES'] = 'use_external_builder=1'
+ test.run_gyp('external.gyp')
+ test.build('external.gyp', target='external')
+finally:
+ del os.environ['GYP_DEFINES']
+test.must_not_exist('msbuild_rule.out')
+test.must_not_exist('msbuild_action.out')
+test.must_exist('external_builder.out')
+test.must_match('external_builder.out', 'external_builder.py build 1 2 3')
+os.remove('external_builder.out')
+
+# with the flag set, using Clean
+try:
+ os.environ['GYP_DEFINES'] = 'use_external_builder=1'
+ test.run_gyp('external.gyp')
+ test.build('external.gyp', target='external', clean=True)
+finally:
+ del os.environ['GYP_DEFINES']
+test.must_not_exist('msbuild_rule.out')
+test.must_not_exist('msbuild_action.out')
+test.must_exist('external_builder.out')
+test.must_match('external_builder.out', 'external_builder.py clean 4 5')
+os.remove('external_builder.out')
+
+test.pass_test()
+
« no previous file with comments | « test/msvs/external_builder/external_builder.py ('k') | test/msvs/external_builder/hello.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698