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

Unified Diff: test/cflags/gyptest-cflags.py

Issue 23140009: Rework the cflags test so it works cross platform. (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 4 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/cflags/cflags.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/cflags/gyptest-cflags.py
===================================================================
--- test/cflags/gyptest-cflags.py (revision 1697)
+++ test/cflags/gyptest-cflags.py (working copy)
@@ -33,7 +33,7 @@
try:
PushEnv()
- os.environ['CFLAGS'] = '-O0'
+ os.environ['CFLAGS'] = ''
os.environ['GYP_CROSSCOMPILE'] = '1'
test.run_gyp('cflags.gyp')
test.build('cflags.gyp')
@@ -44,9 +44,7 @@
PopEnv()
-expect = """\
-Using no optimization flag
-"""
+expect = """FOO not defined\n"""
test.run_built_executable('cflags', stdout=expect)
test.run_built_executable('cflags_host', stdout=expect)
@@ -54,7 +52,7 @@
try:
PushEnv()
- os.environ['CFLAGS'] = '-O2'
+ os.environ['CFLAGS'] = '-DFOO=1'
os.environ['GYP_CROSSCOMPILE'] = '1'
test.run_gyp('cflags.gyp')
test.build('cflags.gyp')
@@ -65,22 +63,18 @@
PopEnv()
-expect = """\
-Using an optimization flag
-"""
+expect = """FOO defined\n"""
test.run_built_executable('cflags', stdout=expect)
# Environment variables shouldn't influence the flags for the host.
-expect = """\
-Using no optimization flag
-"""
+expect = """FOO not defined\n"""
test.run_built_executable('cflags_host', stdout=expect)
test.sleep()
try:
PushEnv()
- os.environ['CFLAGS'] = '-O0'
+ os.environ['CFLAGS'] = ''
test.run_gyp('cflags.gyp')
test.build('cflags.gyp')
finally:
@@ -90,16 +84,14 @@
PopEnv()
-expect = """\
-Using no optimization flag
-"""
+expect = """FOO not defined\n"""
test.run_built_executable('cflags', stdout=expect)
test.sleep()
try:
PushEnv()
- os.environ['CFLAGS'] = '-O2'
+ os.environ['CFLAGS'] = '-DFOO=1'
test.run_gyp('cflags.gyp')
test.build('cflags.gyp')
finally:
@@ -109,9 +101,7 @@
PopEnv()
-expect = """\
-Using an optimization flag
-"""
+expect = """FOO defined\n"""
test.run_built_executable('cflags', stdout=expect)
test.pass_test()
« no previous file with comments | « test/cflags/cflags.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698