| OLD | NEW |
| 1 # -*- python -*- | 1 # -*- python -*- |
| 2 # Copyright 2010 The Native Client Authors. All rights reserved. | 2 # Copyright 2010 The Native Client Authors. All rights reserved. |
| 3 # Use of this source code is governed by a BSD-style license that can | 3 # Use of this source code is governed by a BSD-style license that can |
| 4 # be found in the LICENSE file. | 4 # be found in the LICENSE file. |
| 5 | 5 |
| 6 Import('env') | 6 Import('env') |
| 7 | 7 |
| 8 # tests in this directory contain (inline) assembler | 8 # tests in this directory contain (inline) assembler |
| 9 if env.Bit('bitcode'): | 9 if env.Bit('bitcode'): |
| 10 Return() | 10 Return() |
| 11 | 11 |
| 12 if not env.IsRunningUnderValgrind(): | 12 if not env.IsRunningUnderValgrind(): |
| 13 Return() | 13 Return() |
| 14 | 14 |
| 15 if env.Bit('nacl_glibc'): | 15 if env.Bit('nacl_glibc'): |
| 16 golden = env.File('memcheck_test.glibc.stderr.golden') | 16 golden = env.File('memcheck_test.glibc.stderr.golden') |
| 17 else: | 17 else: |
| 18 golden = env.File('memcheck_test.stderr.golden') | 18 golden = env.File('memcheck_test.stderr.golden') |
| 19 | 19 |
| 20 env.ComponentProgram('memcheck_test.nexe', 'memcheck_test.c') | 20 memcheck_test_nexe = env.ComponentProgram('memcheck_test', 'memcheck_test.c') |
| 21 node = env.CommandSelLdrTestNacl( | 21 node = env.CommandSelLdrTestNacl( |
| 22 'memcheck_test.out', | 22 'memcheck_test.out', |
| 23 command=[env.File('memcheck_test.nexe')], | 23 memcheck_test_nexe, |
| 24 stderr_golden=golden, | 24 stderr_golden=golden, |
| 25 filter_group_only='true', | 25 filter_group_only='true', |
| 26 filter_regex=( | 26 filter_regex=( |
| 27 "'(Invalid [a-z]+ of size .+)|" | 27 "'(Invalid [a-z]+ of size .+)|" |
| 28 "( at )0x[01-9A-Fa-f]+: ([_a-zA-Z][_a-zA-Z01-9]+) [^ ]+:[01-9]+|" | 28 "( at )0x[01-9A-Fa-f]+: ([_a-zA-Z][_a-zA-Z01-9]+) [^ ]+:[01-9]+|" |
| 29 "( by )0x[01-9A-Fa-f]+: ([_a-zA-Z][_a-zA-Z01-9]+) [^ ]+:[01-9]+|" | 29 "( by )0x[01-9A-Fa-f]+: ([_a-zA-Z][_a-zA-Z01-9]+) [^ ]+:[01-9]+|" |
| 30 "( Address) 0x[01-9A-Fa-f]+( is.+)|" | 30 "( Address) 0x[01-9A-Fa-f]+( is.+)|" |
| 31 "( Conditional jump or move depends.+)|" | 31 "( Conditional jump or move depends.+)|" |
| 32 "(VG_USERREQ__CLIENT_CALL.+)|" | 32 "(VG_USERREQ__CLIENT_CALL.+)|" |
| 33 "( .*BACKTRACE:)|" | 33 "( .*BACKTRACE:)|" |
| 34 "(ERROR SUMMARY: [01-9]+ errors from [01-9]+ contexts)|" | 34 "(ERROR SUMMARY: [01-9]+ errors from [01-9]+ contexts)|" |
| 35 "(strcmp: .*)'"), | 35 "(strcmp: .*)'"), |
| 36 exit_status='1', | 36 exit_status='1', |
| 37 ) | 37 ) |
| 38 env.AddNodeToTestSuite(node, ['memcheck_bot_tests'], 'run_memcheck_test') | 38 env.AddNodeToTestSuite(node, ['memcheck_bot_tests'], 'run_memcheck_test') |
| 39 | 39 |
| 40 | 40 |
| 41 # Leak checker sanity test. | 41 # Leak checker sanity test. |
| 42 if env.Bit('with_leakcheck'): | 42 if env.Bit('with_leakcheck'): |
| 43 env.ComponentProgram('leak_test.nexe', 'leak_test.c', | 43 leak_test_nexe = env.ComponentProgram('leak_test', 'leak_test.c', |
| 44 EXTRA_LIBS=['pthread']) | 44 EXTRA_LIBS=['pthread']) |
| 45 node = env.CommandSelLdrTestNacl( | 45 node = env.CommandSelLdrTestNacl( |
| 46 'leak_test.out', | 46 'leak_test.out', |
| 47 command=[env.File('leak_test.nexe')], | 47 leak_test_nexe, |
| 48 stderr_golden=env.File('leak_test.stderr.golden'), | 48 stderr_golden=env.File('leak_test.stderr.golden'), |
| 49 filter_group_only='true', | 49 filter_group_only='true', |
| 50 filter_regex=( | 50 filter_regex=( |
| 51 "'(7,931,147 bytes in 1 blocks are definitely lost).*'"), | 51 "'(7,931,147 bytes in 1 blocks are definitely lost).*'"), |
| 52 exit_status='1', | 52 exit_status='1', |
| 53 ) | 53 ) |
| 54 env.AddNodeToTestSuite(node, ['memcheck_bot_tests'], 'run_leak_test') | 54 env.AddNodeToTestSuite(node, ['memcheck_bot_tests'], 'run_leak_test') |
| OLD | NEW |