Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / native_client / src / shared / gio / build.scons
1 # -*- python -*-
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
4 # found in the LICENSE file.
5
6 import os
7
8 Import('env')
9
10 env.DualLibrary('gio',
11                 ['gio.c',
12                  'gprintf.c',
13                  ])
14
15
16 gtest_env = env.MakeGTestEnv()
17
18 gtest_env.DualLibrary('gio_test', ['gio_test_base.cc'])
19
20 gio_test_exe = gtest_env.ComponentProgram(
21     'gio_test',
22     ['gio_test.cc'],
23     EXTRA_LIBS=['gio', 'platform', 'gio_test'])
24
25 # temp file will be removed by gio_test (if it compiles and test completes).
26 temp_path = env.MakeEmptyFile(prefix='tmp_gio', suffix='.tmp')
27
28 node = gtest_env.CommandTest(
29     'gio_test_output.xml.out',
30     command=[gio_test_exe,
31              '--gtest_output=xml:${TARGET}',
32              '-t', temp_path,
33    # Note: to regenerate the premade_text/binary_file, use "make_premade.py"
34              '-x', env.File('premade_text_file'),
35              '-b', env.File('premade_binary_file'),
36              ],
37     )
38 gtest_env.AddNodeToTestSuite(node, ['small_tests'],
39     'run_gio_test')
40
41 gprintf_test_exe = env.ComponentProgram(
42     'gprintf_test',
43     ['gprintf_test.c'],
44     EXTRA_LIBS=['gio'])
45
46 node = env.CommandTest(
47     'gprintf_test.out',
48     command=[gprintf_test_exe],
49     stdout_golden=env.File('testdata/gprintf_test.stdout'))
50
51 env.AddNodeToTestSuite(node, ['small_tests'], 'run_gprintf_test')