aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/run_tests/helper_scripts
diff options
context:
space:
mode:
Diffstat (limited to 'tools/run_tests/helper_scripts')
-rwxr-xr-xtools/run_tests/helper_scripts/build_php.sh4
-rwxr-xr-xtools/run_tests/helper_scripts/build_python.sh26
-rw-r--r--tools/run_tests/helper_scripts/pre_build_cmake.bat6
-rw-r--r--tools/run_tests/helper_scripts/pre_build_csharp.bat10
4 files changed, 19 insertions, 27 deletions
diff --git a/tools/run_tests/helper_scripts/build_php.sh b/tools/run_tests/helper_scripts/build_php.sh
index 443be34fa0..4add036672 100755
--- a/tools/run_tests/helper_scripts/build_php.sh
+++ b/tools/run_tests/helper_scripts/build_php.sh
@@ -30,8 +30,8 @@ cd src/php
cd ext/grpc
phpize
if [ "$CONFIG" != "gcov" ] ; then
- ./configure --enable-grpc="$root"
+ ./configure --enable-grpc="$root" --enable-tests
else
- ./configure --enable-grpc="$root" --enable-coverage
+ ./configure --enable-grpc="$root" --enable-coverage --enable-tests
fi
make
diff --git a/tools/run_tests/helper_scripts/build_python.sh b/tools/run_tests/helper_scripts/build_python.sh
index b0a6f0f4d4..6990244e51 100755
--- a/tools/run_tests/helper_scripts/build_python.sh
+++ b/tools/run_tests/helper_scripts/build_python.sh
@@ -112,10 +112,6 @@ export CFLAGS="-I$ROOT/include -std=gnu99 -fno-wrapv $CFLAGS"
export GRPC_PYTHON_BUILD_WITH_CYTHON=1
export LANG=en_US.UTF-8
-# Default python on the host to fall back to when instantiating e.g. the
-# virtualenv.
-HOST_PYTHON=${HOST_PYTHON:-python}
-
# If ccache is available on Linux, use it.
if [ "$(is_linux)" ]; then
# We're not on Darwin (Mac OS X)
@@ -132,14 +128,9 @@ fi
# Perform build operations #
############################
-# Instantiate the virtualenv, preferring to do so from the relevant python
-# version. Even if these commands fail (e.g. on Windows due to name conflicts)
-# it's possible that the virtualenv is still usable and we trust the tester to
-# be able to 'figure it out' instead of us e.g. doing potentially expensive and
-# unnecessary error recovery by `rm -rf`ing the virtualenv.
-($PYTHON -m virtualenv "$VENV" ||
- $HOST_PYTHON -m virtualenv -p "$PYTHON" "$VENV" ||
- true)
+# Instantiate the virtualenv from the Python version passed in.
+$PYTHON -m pip install --user virtualenv
+$PYTHON -m virtualenv "$VENV"
VENV_PYTHON=$(script_realpath "$VENV/$VENV_RELATIVE_PYTHON")
# See https://github.com/grpc/grpc/issues/14815 for more context. We cannot rely
@@ -159,14 +150,21 @@ pip_install_dir() {
case "$VENV" in
*gevent*)
- $VENV_PYTHON -m pip install gevent
+ # TODO(https://github.com/grpc/grpc/issues/15411) unpin this
+ $VENV_PYTHON -m pip install gevent==1.3.b1
;;
esac
$VENV_PYTHON -m pip install --upgrade pip==10.0.1
$VENV_PYTHON -m pip install setuptools
$VENV_PYTHON -m pip install cython
-$VENV_PYTHON -m pip install six enum34 protobuf futures
+$VENV_PYTHON -m pip install six enum34 protobuf
+
+if [ "$("$VENV_PYTHON" -c "import sys; print(sys.version_info[0])")" == "2" ]
+then
+ $VENV_PYTHON -m pip install futures
+fi
+
pip_install_dir "$ROOT"
$VENV_PYTHON "$ROOT/tools/distrib/python/make_grpcio_tools.py"
diff --git a/tools/run_tests/helper_scripts/pre_build_cmake.bat b/tools/run_tests/helper_scripts/pre_build_cmake.bat
index d89fc5fec2..f0777760aa 100644
--- a/tools/run_tests/helper_scripts/pre_build_cmake.bat
+++ b/tools/run_tests/helper_scripts/pre_build_cmake.bat
@@ -24,11 +24,7 @@ cd cmake
mkdir build
cd build
-@rem TODO(jtattermusch): Stop hardcoding path to yasm once Jenkins workers can locate yasm correctly
-@rem If yasm is not on the path, use hardcoded path instead.
-yasm --version || set USE_HARDCODED_YASM_PATH_MAYBE=-DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe"
-
-cmake -G %GENERATOR% -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=ON %USE_HARDCODED_YASM_PATH_MAYBE% ../.. || goto :error
+cmake -G %GENERATOR% -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=ON ../.. || goto :error
endlocal
diff --git a/tools/run_tests/helper_scripts/pre_build_csharp.bat b/tools/run_tests/helper_scripts/pre_build_csharp.bat
index 63f6645620..2ae870ebb1 100644
--- a/tools/run_tests/helper_scripts/pre_build_csharp.bat
+++ b/tools/run_tests/helper_scripts/pre_build_csharp.bat
@@ -28,15 +28,13 @@ cd build
mkdir %ARCHITECTURE%
cd %ARCHITECTURE%
-@rem TODO(jtattermusch): Stop hardcoding path to yasm once Jenkins workers can locate yasm correctly
-@rem If yasm is not on the path, use hardcoded path instead.
-yasm --version || set USE_HARDCODED_YASM_PATH_MAYBE=-DCMAKE_ASM_NASM_COMPILER="C:/Program Files (x86)/yasm/yasm.exe"
-
-cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON %USE_HARDCODED_YASM_PATH_MAYBE% ../../.. || goto :error
+cmake -G "Visual Studio 14 2015" -A %ARCHITECTURE% -DgRPC_BUILD_TESTS=OFF -DgRPC_MSVC_STATIC_RUNTIME=ON ../../.. || goto :error
cd ..\..\..\src\csharp
-dotnet restore Grpc.sln || goto :error
+if NOT DEFINED GRPC_SKIP_DOTNET_RESTORE (
+ dotnet restore Grpc.sln || goto :error
+)
endlocal