Commit Graph

57 Commits

Author SHA1 Message Date
Masood Malekghassemi 3b5b20682b Make running individual Python tests less painful
Before this change, running Python tests individually required
building a tox environment via the run_tests script and then specifying
long environment variables to filter out just the test we wanted to run
(and then we wouldn't be able to get the output on interrupt, nor would
we have an easy way of determining the PID of the process for debugger
attachment). Now invoking the build_python.sh script creates a workable
python virtual environment that includes all necessary libraries and
tests (s.t. running a single test is now possible by just knowing the
module name). This does not change existing supported means of running
tests (e.g. through run_tests.py).

An additional way of running individual tests has been introduced.
Following invocation of `./tools/run_tests/build_python.sh` (or
run_tests.py), one may invoke

  ./$VENV/bin/python -m $TEST_MODULE_NAME

and acquire a single running process that *is* the test process (rather
than a parent of the process). $VENV is the virtual environment name
specified to `build_python.sh` (defaults to `py27`) and
$TEST_MODULE_NAME is what it says on the tin.
2016-07-01 10:18:45 -07:00
Masood Malekghassemi 1ff429da2a Organize Python tests to use grpcio-tools directly
Moves all tests into a separate package. This does not change existing
supported means of running tests (e.g. through run_tests.py).
2016-07-01 10:18:45 -07:00
Ken Payson 1efb6017ec Initial Python3 support
Notable Changes:
  -Convert all str types to byte types at cython layer (ascii encoding)
  -Use six for packages that have different names in Python2/Python3
  -By default, unit tests are compiled/run in Python2.7 and Python3.4
  -Ensure MACOSX_BUILD_TARGET is at least 10.7
2016-06-10 11:48:24 -07:00
Jan Tattermusch 825471c387 Add --compiler python3.4 option to run_tests.py 2016-04-26 18:19:45 -07:00
Craig Tiller 64a12c55df Merge github.com:grpc/grpc into copyright-fix 2016-03-31 07:49:58 -07:00
Craig Tiller 6169d5f7b0 Update copyrights 2016-03-31 07:46:18 -07:00
Masood Malekghassemi 7d8ac466d6 Don't allow precompiled binaries in tests
Before it was possible for precompiled binaries of the Cython layer to
be downloaded during a test run if the metadata of the host machine's
gRPC Python project matched the metadata of a file in cloud storage. Now
we disallow this, and fix a bug where the relevant environment variable
was ineffectual.
2016-03-24 12:48:47 -07:00
Masood Malekghassemi 68a94c8f07 Don't set linetrace unless testing coverage 2016-03-09 16:18:13 -08:00
Jan Tattermusch e6cc9c7a25 custom test target for parallel test running 2016-03-07 13:08:59 -08:00
Jan Tattermusch 072ebaa153 make python test suites run in parallel 2016-03-02 17:46:18 -08:00
murgatroid99 3466c4b55d Updated copyrights 2016-01-12 10:26:04 -08:00
Masood Malekghassemi 387e116fd6 Use BoringSSL for Python gRPC 2016-01-11 11:32:42 -08:00
Masood Malekghassemi 116982ea89 Include core in Python distribution 2016-01-07 09:43:42 -08:00
Masood Malekghassemi 070b91c3f2 Generate coverage HTML reports for Jenkins 2015-12-04 17:26:07 -08:00
Masood Malekghassemi d00241e65c Use tox 2015-12-04 17:26:07 -08:00
Masood Malekghassemi 7566c9a85d Make Python testing predictable again
This reorganizes the Python code, scraps the current testing
infrastructure, and implements a simple test discovery and run script
based on the standard Python unittest library so we can trust that our
tests are running.
2015-12-03 16:59:14 -08:00
Masood Malekghassemi f194d6f828 Set pytest-xdist-compatible pytest-timeout method 2015-10-06 16:17:50 -07:00
Masood Malekghassemi c234f23ce7 Add verbosity back to Python testing output 2015-10-06 14:43:43 -07:00
Masood Malekghassemi d43ad333b8 Make load_tests protocol tests run via py.test 2015-09-30 15:11:24 -07:00
Nathaniel Manista 9e4d0610ea The rest of the Python Beta API 2015-08-31 08:54:06 +00:00
Masood Malekghassemi 967caaada0 Merge pull request #3052 from nathanielmanistaatgoogle/crust
The RPC Framework crust package
2015-08-27 00:17:05 -04:00
Nathaniel Manista 4c8288ec01 The RPC Framework crust package 2015-08-25 22:17:59 +00:00
Masood Malekghassemi 8f56c422f8 Add global per-test timeout to Python test harness 2015-08-25 14:07:18 -07:00
Masood Malekghassemi 71e29ef459 Add new core tests to run_tests/run_python.sh
The tests don't currently get discovered by py.test due to their use of
the Python 2.7+ load_tests protocol.
2015-08-21 14:22:11 -07:00
Masood Malekghassemi ed96983e22 Move Python protoc plugin tests to grpcio_test 2015-08-04 16:11:08 -07:00
Masood Malekghassemi 2b84162bd4 Use py.test from run_tests.py
Also updates the version of grpcio_test. Now that grpcio and its tests
are in different project packages, the version numbers should be kept in
sync.
2015-07-31 14:13:11 -07:00
Masood Malekghassemi e5f7002617 Add Python3 testing support
Conditionally runs the tests depending on the availability of Python
versions (because Travis is the worst).
2015-07-09 12:41:04 -07:00
Masood Malekghassemi d86576f2e5 Fix MacOS Python test linker paths 2015-05-21 19:05:21 -07:00
Masood Malekghassemi 65af063ad7 Fix Python test ignorance of build config 2015-03-17 11:46:58 -07:00
Masood Malekghassemi b2d4a8de95 Have Python protoc plugin test run with other tests 2015-03-05 17:48:23 -08:00
Craig Tiller 49f6132053 Teach run_tests about individual Python tests
Allows:
- running python tests in parallel
- clearer Travis output
- subjects each python test to the five minute run_tests timeout,
  instead of ALL the tests to the five minute timeout
- easier benchmarking of which tests are slow
2015-03-05 10:57:43 -08:00
murgatroid99 5c4052d771 Removed logging, returned other tests to .travis.yml 2015-03-02 13:28:12 -08:00
murgatroid99 238c23b453 Added more logging 2015-03-02 12:13:20 -08:00
murgatroid99 fb0b99ea8f Fixed ldd logging 2015-03-02 11:56:00 -08:00
murgatroid99 985c5bf2e0 Added logging for python tests 2015-03-02 11:50:23 -08:00
murgatroid99 d6fea899b8 Added TODO to re-enable commented test 2015-03-02 11:09:46 -08:00
murgatroid99 cedab130c2 Put tests back in a useful state 2015-03-02 10:42:24 -08:00
murgatroid99 a2af8a1a98 Changed how python versions are specified 2015-03-02 10:31:40 -08:00
murgatroid99 0af2a46d7c Add more logging 2015-03-02 10:10:40 -08:00
murgatroid99 d1d1626263 Added another log line 2015-02-27 16:44:32 -08:00
murgatroid99 7d33c2a90f Added log line 2015-02-27 16:33:47 -08:00
Nathaniel Manista 732cf09a93 Drop fixed port from python_plugin_test
There may be some aspect of mortal sin in the way that context
management is now done in this test.
2015-02-27 00:47:38 +00:00
Masood Malekghassemi 02a74dd244 Merge pull request #785 from nathanielmanistaatgoogle/early-adopter-changes
Final changes to the early_adopter API.
2015-02-25 12:34:28 -08:00
Nathaniel Manista 9280790a5d Final changes to the early_adopter API.
This makes grpc.early_adopter much more independent of RPC
Framework and cleaner at the cost of reexporting most of the
interfaces and writing several delegation classes.
2015-02-25 17:14:11 +00:00
Masood Malekghassemi 59d9ff4d9f Updated Python protoc plugin testing. 2015-02-24 19:11:08 -08:00
Masood Malekghassemi b13673dd7a Added compiler plugin test for Python. 2015-02-20 18:52:23 -08:00
Nathaniel Manista 7efe54e336 The framework.assembly package.
This provides for now what should be a nicer interface for code
generation than that of the Face layer. In terms of abstraction
it's conceptually very similar so the two should probably be
merged as soon as is reasonable.
2015-02-20 23:05:32 +00:00
Craig Tiller ce5021b0b9 Add missing new-lines at end of file 2015-02-18 09:25:21 -08:00
Craig Tiller 0605995e55 Update copyright to 2015 2015-02-18 08:34:56 -08:00
Craig Tiller 347b83c222 Merge github.com:grpc/grpc into copyright
Conflicts:
	src/python/src/__init__.py
	src/python/src/_adapter/__init__.py
	src/python/src/_framework/__init__.py
	src/python/src/_framework/base/__init__.py
	src/python/src/_framework/base/packets/__init__.py
	src/python/src/_framework/common/__init__.py
	src/python/src/_framework/face/__init__.py
	src/python/src/_framework/face/testing/__init__.py
	src/python/src/_framework/foundation/__init__.py
	src/python/src/_junkdrawer/__init__.py
2015-02-17 20:28:40 -08:00