Index: ppapi/native_client/tests/ppapi_browser/crash/nacl.scons |
=================================================================== |
--- ppapi/native_client/tests/ppapi_browser/crash/nacl.scons (revision 0) |
+++ ppapi/native_client/tests/ppapi_browser/crash/nacl.scons (revision 0) |
@@ -0,0 +1,48 @@ |
+# -*- 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'] |
+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()) |