summaryrefslogtreecommitdiffstats
path: root/ppapi/native_client/tests/ppapi_browser/crash/nacl.scons
blob: 2f942e18d9acd5869d9670f7a97a85f0dacc47b9 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
# -*- python -*-
# Copyright (c) 2011 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.
#
# Tests fatal errors that occur after loading.
# (See ppapi_browser/bad for fatal errors that occur during loading).
#
# The tests use ppapi_test_lib.

Import('env')

env.Prepend(CPPDEFINES=['XP_UNIX'])

crash_types = ['via_check_failure',
               'via_exit_call',
               'in_callback',
               'off_main_thread',
               'ppapi_off_main_thread']
published_files = []

for crash_type in crash_types:
  nexe = 'ppapi_crash_%s_%s' % (crash_type, env.get('TARGET_FULLARCH'))
  env.Alias('ppapi_crash_%s${PROGSUFFIX}' % crash_type,
            ['$STAGING_DIR/%s${PROGSUFFIX}' % nexe])

  env.ComponentProgram(
      nexe,
      ['ppapi_crash_%s.cc' % crash_type],
      EXTRA_LIBS=['${PPAPI_LIBS}',
                  'ppapi_test_lib',
                  'platform',
                  'pthread',
                  'gio'])

# TODO(polina): follow ppapi_browser/bad nacl.scons to publish html only once
# and to associate all nexes and nmf files with one target that can be
# referenced in tests/nacl.scons.
  env.Publish(nexe, 'run',
              ['ppapi_crash.html',
               'ppapi_crash_%s.nmf' % crash_type ])

  published_files.extend(env.ExtractPublishedFiles(nexe))

node = env.PPAPIBrowserTester('ppapi_crash_browser_test.out',
                              url='ppapi_crash.html',
                              files=published_files)

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