llvm-lit 945 B

1234567891011121314151617181920212223242526
  1. #!/usr/bin/env python
  2. import os
  3. import sys
  4. # In the Android tree, use the environment variables set by envsetup.sh
  5. # to determine correct path for the root of the source tree.
  6. # TODO: To run clang tests, @LLVM_BINARY_DIR@ must be substituted also.
  7. android_source_root = os.getenv('ANDROID_BUILD_TOP', ".")
  8. llvm_source_root = os.path.join(android_source_root, 'external', 'llvm')
  9. libbcc_source_root = os.path.join(android_source_root, 'frameworks', 'compile',
  10. 'libbcc')
  11. # Make sure we can find the lit package.
  12. sys.path.append(os.path.join(llvm_source_root, 'utils', 'lit'))
  13. # Set up some builtin parameters, so that by default the LLVM test suite
  14. # configuration file knows how to find the object tree.
  15. builtin_parameters = {
  16. 'llvm_site_config' : os.path.join(libbcc_source_root, 'test', 'debuginfo',
  17. 'lit.site.cfg')
  18. }
  19. if __name__=='__main__':
  20. import lit
  21. lit.main(builtin_parameters)