lit.cfg 2.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. # -*- Python -*-
  2. #
  3. # Copyright (C) 2012 The Android Open Source Project
  4. #
  5. # Licensed under the Apache License, Version 2.0 (the "License");
  6. # you may not use this file except in compliance with the License.
  7. # You may obtain a copy of the License at
  8. #
  9. # http://www.apache.org/licenses/LICENSE-2.0
  10. #
  11. # Unless required by applicable law or agreed to in writing, software
  12. # distributed under the License is distributed on an "AS IS" BASIS,
  13. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  14. # See the License for the specific language governing permissions and
  15. # limitations under the License.
  16. #
  17. #
  18. ### Configuration file for target side debugger integration tests
  19. #
  20. # Set up the suite name, extensions that are recognized as testcases, and
  21. # the target triple string that must be used in cases marked expected failures
  22. config.name = 'host_bcc_debugger_integration'
  23. config.suffixes = ['.cpp', '.c']
  24. config.target_triple = 'host-bcc'
  25. # If the user is running an individual tests directory, we have to load
  26. # the libbcc site configuration first
  27. build_top = getattr(config, 'build_top', None)
  28. if build_top is None:
  29. lit.load_config(config, os.path.join(os.getenv('ANDROID_BUILD_TOP',
  30. '../../../../../'), 'frameworks', 'compile', 'libbcc', 'tests',
  31. 'debuginfo', 'lit.site.cfg'))
  32. build_top = config.build_top
  33. # Output directory in the android source tree
  34. config.test_exec_root = os.path.join(config.build_top, 'out', 'host',
  35. 'tests', 'bcc-host')
  36. #
  37. ## Set up environment variables
  38. #
  39. # - LD_LIBRARY_PATH for finding libbcc.so from the android build
  40. config.environment['LD_LIBRARY_PATH'] = \
  41. os.path.join(config.base_build_path, 'lib') + ":" + \
  42. config.environment['LD_LIBRARY_PATH']
  43. # - DEBUGGER and DEBUGGER_ARGS denote how to invoke the debugger
  44. config.environment['DEBUGGER'] = config.gdb
  45. config.environment['DEBUGGER_ARGS'] = '-q -batch -n --args ' \
  46. + config.bcc_driver + ' -R '
  47. if not lit.quiet:
  48. lit.note('using clang: %r' % config.clang)
  49. lit.note('using bcc driver: %r' % config.bcc_driver)
  50. lit.note('LD_LIBRARY_PATH is %r' % config.environment['LD_LIBRARY_PATH'])
  51. # Apply host-side test macro substitutions
  52. config.substitutions.append( ('%clangxx', ' ' + config.clang + \
  53. ' -ccc-clang-cxx -ccc-cxx ') )
  54. config.substitutions.append( ('%extra-clang-opts', ' -emit-llvm -c ') )
  55. config.substitutions.append( ('%clang', ' ' + config.clang + ' ') )