OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright 2011 The Native Client Authors. All rights reserved. | 2 # Copyright 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
5 | 5 |
6 # OpenGL ES examples | 6 # OpenGL ES examples |
7 | 7 |
8 Import('env') | 8 Import('env') |
9 | 9 |
10 env.Prepend(CPPDEFINES=['XP_UNIX']) | 10 env.Prepend(CPPDEFINES=['XP_UNIX']) |
| 11 env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' + |
| 12 'ppapi_gles_book/') |
11 | 13 |
12 # Underlay $SOURCE_ROOT/gpu in this directory. | 14 # Underlay $SOURCE_ROOT/gpu in this directory. |
13 Dir('.').addRepository(Dir('#/../gpu')) | 15 Dir('.').addRepository(Dir('#/../gpu')) |
14 | 16 |
15 # Underlay $SOURCE_ROOT/third_party/gles2_book in this directory. | 17 # Underlay $SOURCE_ROOT/third_party/gles2_book in this directory. |
16 Dir('.').addRepository(Dir('#/../third_party/gles2_book')) | 18 Dir('.').addRepository(Dir('#/../third_party/gles2_book')) |
17 | 19 |
18 # Don't warn on pointer signedness issues (third_party sources) | 20 # Don't warn on pointer signedness issues (third_party sources) |
19 env.Append(CFLAGS=['-Wno-pointer-sign']) | 21 env.Append(CFLAGS=['-Wno-pointer-sign']) |
20 # ..and don't warn about missing braces | 22 # ..and don't warn about missing braces |
(...skipping 29 matching lines...) Expand all Loading... |
50 'Chapter_8/Simple_VertexShader/Simple_VertexShader.c'], | 52 'Chapter_8/Simple_VertexShader/Simple_VertexShader.c'], |
51 'stencil_test': [ | 53 'stencil_test': [ |
52 'Chapter_11/Stencil_Test/Stencil_Test.c'], | 54 'Chapter_11/Stencil_Test/Stencil_Test.c'], |
53 'texture_wrap': [ | 55 'texture_wrap': [ |
54 'Chapter_9/TextureWrap/TextureWrap.c'], | 56 'Chapter_9/TextureWrap/TextureWrap.c'], |
55 } | 57 } |
56 | 58 |
57 for demo, sources in gles_book_examples.iteritems(): | 59 for demo, sources in gles_book_examples.iteritems(): |
58 nexe_name = ('ppapi_gles_book_%s_%s' | 60 nexe_name = ('ppapi_gles_book_%s_%s' |
59 % (demo, env.get('TARGET_FULLARCH'))) | 61 % (demo, env.get('TARGET_FULLARCH'))) |
60 nmf_name = 'ppapi_gles_book_' + demo + '.nmf' | 62 nmf_name = '${TEST_DIR}/ppapi_gles_book_' + demo + '.nmf' |
61 nexe = env.ComponentProgram( | 63 nexe = env.ComponentProgram( |
62 nexe_name, | 64 nexe_name, |
63 ['demos/gles2_book/demo_' + demo + '.cc'] + sources, | 65 ['demos/gles2_book/demo_' + demo + '.cc'] + sources, |
64 EXTRA_LIBS=['${PPAPI_LIBS}', | 66 EXTRA_LIBS=['${PPAPI_LIBS}', |
65 'ppapi_cpp', | 67 'ppapi_cpp', |
66 'ppapi_gles_demo', | 68 'ppapi_gles_demo', |
67 'ppapi_cpp', | 69 'ppapi_cpp', |
68 'ppapi_gles2', | 70 'ppapi_gles2', |
69 'm']) | 71 'm']) |
70 env.Publish(nexe_name, 'run', | 72 env.Publish(nexe_name, 'run', |
71 ['ppapi_gles_book.html', | 73 ['ppapi_gles_book.html']) |
72 nmf_name]) | |
73 test = env.PPAPIBrowserTester( | 74 test = env.PPAPIBrowserTester( |
74 'ppapi_gles_book_' + demo + '.out', | 75 'ppapi_gles_book_' + demo + '.out', |
75 url='ppapi_gles_book.html?manifest=' + nmf_name, | 76 url='ppapi_gles_book.html?manifest=' + nmf_name, |
| 77 nmf=nmf_name, |
76 files=[nexe, | 78 files=[nexe, |
77 env.File(nmf_name), | 79 env.File(nmf_name), |
78 env.File('ppapi_gles_book.html')], | 80 env.File('ppapi_gles_book.html')], |
79 browser_flags=['--enable-accelerated-plugins']) | 81 browser_flags=['--enable-accelerated-plugins']) |
80 env.AddNodeToTestSuite( | 82 env.AddNodeToTestSuite( |
81 test, | 83 test, |
82 ['chrome_browser_tests'], | 84 ['chrome_browser_tests'], |
83 'run_ppapi_gles_book_' + demo + '_test', | 85 'run_ppapi_gles_book_' + demo + '_test', |
84 is_broken=env.PPAPIBrowserTesterIsBroken() or | 86 is_broken=env.PPAPIBrowserTesterIsBroken() or |
85 env.PPAPIGraphics3DIsBroken()) | 87 env.PPAPIGraphics3DIsBroken()) |
OLD | NEW |