aboutsummaryrefslogtreecommitdiff
path: root/vim/bundle/YouCompleteMe/run_tests.py
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2016-06-30 16:11:56 +0200
committerKarel Kočí <cynerd@email.cz>2016-06-30 16:11:56 +0200
commit9931e0888b2419326ae10ebbfae532261c5c125f (patch)
tree7504be5daccbb7b7d1ea396754de47b11ed790e5 /vim/bundle/YouCompleteMe/run_tests.py
parente573b3020c032400eed60b649a2cbf55266e6bb0 (diff)
downloadmyconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.gz
myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.tar.bz2
myconfigs-9931e0888b2419326ae10ebbfae532261c5c125f.zip
Fix submodules
Diffstat (limited to 'vim/bundle/YouCompleteMe/run_tests.py')
m---------vim/bundle/YouCompleteMe0
-rwxr-xr-xvim/bundle/YouCompleteMe/run_tests.py81
2 files changed, 0 insertions, 81 deletions
diff --git a/vim/bundle/YouCompleteMe b/vim/bundle/YouCompleteMe
new file mode 160000
+Subproject 0de1c0c9bb13ce82172b472c676035cd47cf6a6
diff --git a/vim/bundle/YouCompleteMe/run_tests.py b/vim/bundle/YouCompleteMe/run_tests.py
deleted file mode 100755
index c837b9f..0000000
--- a/vim/bundle/YouCompleteMe/run_tests.py
+++ /dev/null
@@ -1,81 +0,0 @@
-#!/usr/bin/env python
-
-import os
-import subprocess
-import os.path as p
-import sys
-
-DIR_OF_THIS_SCRIPT = p.dirname( p.abspath( __file__ ) )
-DIR_OF_THIRD_PARTY = p.join( DIR_OF_THIS_SCRIPT, 'third_party' )
-DIR_OF_YCMD_THIRD_PARTY = p.join( DIR_OF_THIRD_PARTY, 'ycmd', 'third_party' )
-
-python_path = []
-for folder in os.listdir( DIR_OF_THIRD_PARTY ):
- python_path.append( p.abspath( p.join( DIR_OF_THIRD_PARTY, folder ) ) )
-for folder in os.listdir( DIR_OF_YCMD_THIRD_PARTY ):
- # We skip python-future because it needs to be inserted in sys.path AFTER
- # the standard library imports but we can't do that with PYTHONPATH because
- # the std lib paths are always appended to PYTHONPATH. We do it correctly in
- # prod in ycmd/utils.py because we have access to the right sys.path.
- # So for dev, we rely on python-future being installed correctly with
- # pip install -r test_requirements.txt
- #
- # Pip knows how to install this correctly so that it doesn't matter where in
- # sys.path the path is.
- if folder == 'python-future':
- continue
- python_path.append( p.abspath( p.join( DIR_OF_YCMD_THIRD_PARTY, folder ) ) )
-if os.environ.get( 'PYTHONPATH' ):
- python_path.append( os.environ[ 'PYTHONPATH' ] )
-os.environ[ 'PYTHONPATH' ] = os.pathsep.join( python_path )
-
-sys.path.insert( 1, p.abspath( p.join( DIR_OF_YCMD_THIRD_PARTY,
- 'argparse' ) ) )
-
-import argparse
-
-
-def RunFlake8():
- print( 'Running flake8' )
- subprocess.check_call( [
- 'flake8',
- p.join( DIR_OF_THIS_SCRIPT, 'python' )
- ] )
-
-
-def ParseArguments():
- parser = argparse.ArgumentParser()
- parser.add_argument( '--skip-build', action = 'store_true',
- help = 'Do not build ycmd before testing.' )
- parser.add_argument( '--no-flake8', action = 'store_true',
- help = 'Do not run flake8' )
-
- return parser.parse_known_args()
-
-
-def BuildYcmdLibs( args ):
- if not args.skip_build:
- subprocess.check_call( [
- sys.executable,
- p.join( DIR_OF_THIS_SCRIPT, 'third_party', 'ycmd', 'build.py' )
- ] )
-
-
-def NoseTests( extra_args ):
- subprocess.check_call( [
- 'nosetests',
- '-v',
- '-w',
- p.join( DIR_OF_THIS_SCRIPT, 'python' )
- ] + extra_args )
-
-
-def Main():
- ( parsed_args, extra_args ) = ParseArguments()
- if not parsed_args.no_flake8:
- RunFlake8()
- BuildYcmdLibs( parsed_args )
- NoseTests( extra_args )
-
-if __name__ == "__main__":
- Main()