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