File tree Expand file tree Collapse file tree 3 files changed +68
-0
lines changed Expand file tree Collapse file tree 3 files changed +68
-0
lines changed Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ import os
3
+ import sys
4
+ from subprocess import check_call
5
+ import shutil
6
+
7
+ _dname = os .path .dirname
8
+
9
+ REPO_ROOT = _dname (_dname (_dname (os .path .abspath (__file__ ))))
10
+ os .chdir (REPO_ROOT )
11
+
12
+
13
+ def run (command ):
14
+ return check_call (command , shell = True )
15
+
16
+
17
+ try :
18
+ # Has the form "major.minor"
19
+ python_version = os .environ ['PYTHON_VERSION' ]
20
+ except KeyError :
21
+ python_version = '.' .join ([str (i ) for i in sys .version_info [:2 ]])
22
+
23
+ run ('pip install -r requirements-test.txt' )
24
+ if os .path .isdir ('dist' ) and os .listdir ('dist' ):
25
+ shutil .rmtree ('dist' )
26
+ run ('python setup.py bdist_wheel' )
27
+ wheel_dist = os .listdir ('dist' )[0 ]
28
+ run ('pip install %s' % (os .path .join ('dist' , wheel_dist )))
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ # Don't run tests from the root repo dir.
3
+ # We want to ensure we're importing from the installed
4
+ # binary package not from the CWD.
5
+
6
+ import os
7
+ from subprocess import check_call
8
+
9
+ _dname = os .path .dirname
10
+
11
+ REPO_ROOT = _dname (_dname (_dname (os .path .abspath (__file__ ))))
12
+ os .chdir (os .path .join (REPO_ROOT , 'tests' ))
13
+
14
+
15
+ def run (command ):
16
+ return check_call (command , shell = True )
17
+
18
+
19
+ run ('py.test --cov awsshell --junitxml=./pytests.xml --cov-report term-missing'
20
+ ' integration/' )
Original file line number Diff line number Diff line change
1
+ #!/usr/bin/env python
2
+ # Don't run tests from the root repo dir.
3
+ # We want to ensure we're importing from the installed
4
+ # binary package not from the CWD.
5
+
6
+ import os
7
+ from subprocess import check_call
8
+
9
+ _dname = os .path .dirname
10
+
11
+ REPO_ROOT = _dname (_dname (_dname (os .path .abspath (__file__ ))))
12
+ os .chdir (os .path .join (REPO_ROOT , 'tests' ))
13
+
14
+
15
+ def run (command ):
16
+ return check_call (command , shell = True )
17
+
18
+
19
+ run ('py.test --cov awsshell --junitxml=./pytests.xml --cov-report term-missing'
20
+ ' unit/' )
You can’t perform that action at this time.
0 commit comments