1b018e06创建于 2012年8月23日历史提交
# -*- python -*-
# Copyright (c) 2012 The Native Client Authors.  All rights reserved.
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
#
# This test demonstrates sample usage of ppapi_test_lib.
#
# These ppapi_test_lib/ headers should be used by the test setup:
#   test_interface.h - test interface + setup to be implemented by the tester.
#   get_browser_interface.h - provides getters for proxy-supported interfaces.
#
# ppapi_test_example.cc - sample implementation test_interface.h.
# ppapi_test_example.html - sample test driver that uses scripting.
# ppapi_test_example.js   - setup for sample test driver.
# ppapi_test_example.nmf - sample manifest for platform-specific nexes.

Import('env')

env.Prepend(CPPDEFINES=['XP_UNIX'])
env.Replace(TEST_DIR='${SOURCE_ROOT}/ppapi/native_client/tests/' +
                     'ppapi_test_example/')

nexe = env.ProgramNameForNmf('ppapi_test_example')
env.Alias('ppapi_test_example${PROGSUFFIX}',
          ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe])

ppapi_test_example_nexe = env.ComponentProgram(
    nexe,
    ['ppapi_test_example.cc'],
    EXTRA_LIBS=['ppapi',
                'ppapi_test_lib',
                'platform',  # for CHECK
                'pthread',
                'gio',
                ])

env.Publish(nexe, 'run',
            ['ppapi_test_example.html',
             'ppapi_test_example.js'])

node = env.PPAPIBrowserTester('ppapi_test_example_browser_test.out',
                              url='ppapi_test_example.html',
                              nmf_names=['ppapi_test_example'],
                              files=env.ExtractPublishedFiles(nexe))

env.AddNodeToTestSuite(node,
                       ['chrome_browser_tests'],
                       'run_ppapi_test_example_browser_test',
                       is_broken=env.PPAPIBrowserTesterIsBroken())