OLD | NEW |
1 # -*- python -*- | 1 # -*- python -*- |
2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. | 2 # Copyright (c) 2011 The Native Client Authors. All rights reserved. |
3 # Use of this source code is governed by a BSD-style license that can be | 3 # Use of this source code is governed by a BSD-style license that can be |
4 # found in the LICENSE file. | 4 # found in the LICENSE file. |
5 | 5 |
6 # This is a pepper audio example from examples/audio. | 6 # This is a pepper audio example from examples/audio. |
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_example_audio/') | |
13 | 11 |
14 nexe_name = 'ppapi_example_audio_%s' % env.get('TARGET_FULLARCH') | 12 nexe_name = 'ppapi_example_audio_%s' % env.get('TARGET_FULLARCH') |
15 nexe = env.ComponentProgram(nexe_name, | 13 nexe = env.ComponentProgram(nexe_name, |
16 [ 'audio.cc' ], | 14 [ 'audio.cc' ], |
17 EXTRA_LIBS=['${PPAPI_LIBS}', | 15 EXTRA_LIBS=['${PPAPI_LIBS}', |
18 'ppapi_cpp', | 16 'ppapi_cpp', |
19 'platform', | 17 'platform', |
20 'gio', | 18 'gio', |
21 'pthread', | 19 'pthread', |
22 'm']) | 20 'm']) |
23 | 21 |
24 # Note that the html is required to run this program. | 22 # Note that the html is required to run this program. |
25 env.Publish(nexe_name, 'run', | 23 env.Publish(nexe_name, 'run', |
26 ['ppapi_example_audio.html']) | 24 ['ppapi_example_audio.html' , 'ppapi_example_audio.nmf']) |
27 | 25 |
28 test = env.PPAPIBrowserTester('ppapi_example_audio_test.out', | 26 test = env.PPAPIBrowserTester('ppapi_example_audio_test.out', |
29 url='ppapi_example_audio.html#mute', | 27 url='ppapi_example_audio.html#mute', |
30 nmf='${TEST_DIR}/ppapi_example_audio.nmf', | |
31 files=[nexe, | 28 files=[nexe, |
32 env.File('ppapi_example_audio.nmf'), | 29 env.File('ppapi_example_audio.nmf'), |
33 env.File('ppapi_example_audio.html')]) | 30 env.File('ppapi_example_audio.html')]) |
34 | 31 |
35 # Though this tests passes locally, it does not pass on the Windows | 32 # Though this tests passes locally, it does not pass on the Windows |
36 # and Linux buildbots, which do not have audio devices. Although | 33 # and Linux buildbots, which do not have audio devices. Although |
37 # StartPlayback() and StopPlayback() succeed, the audio callback is | 34 # StartPlayback() and StopPlayback() succeed, the audio callback is |
38 # not called. However, this does work on the Mac buildbots. | 35 # not called. However, this does work on the Mac buildbots. |
39 is_broken = env.PPAPIBrowserTesterIsBroken() or not env.Bit('host_mac') | 36 is_broken = env.PPAPIBrowserTesterIsBroken() or not env.Bit('host_mac') |
40 env.AddNodeToTestSuite(test, | 37 env.AddNodeToTestSuite(test, |
41 ['chrome_browser_tests'], | 38 ['chrome_browser_tests'], |
42 'run_ppapi_example_audio_test', | 39 'run_ppapi_example_audio_test', |
43 is_broken=is_broken) | 40 is_broken=is_broken) |
OLD | NEW |