You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mesos.apache.org by kl...@apache.org on 2018/11/19 16:29:56 UTC
[mesos] 01/03: Updated new CLI test step to use binary created by
PyInstaller.
This is an automated email from the ASF dual-hosted git repository.
klueska pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/mesos.git
commit 992b506e19829536b9407f04f4647af6642d9bec
Author: Armand Grillet <ag...@mesosphere.io>
AuthorDate: Mon Nov 19 10:41:13 2018 -0500
Updated new CLI test step to use binary created by PyInstaller.
The integration tests for the new CLI running while building Mesos now
directly use the binary created during the build. That way we make sure
that the binary created using PyInstaller is usable, which is the
artifact that we want to distribute to users in the future.
Previously, we were only activating the virtual environment to run the
tests thus the binary created by PyInstaller was never properly tested.
To use the binary created by PyInstaller, we simply update the PATH
before running 'mesos-cli-tests'.
Review: https://reviews.apache.org/r/69374/
---
src/Makefile.am | 6 ++++--
src/python/cli_new/tests/CMakeLists.txt | 3 ++-
2 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/src/Makefile.am b/src/Makefile.am
index c17eae4..2d9c81b 100644
--- a/src/Makefile.am
+++ b/src/Makefile.am
@@ -2820,9 +2820,11 @@ uninstall-hook:
# http://lists.gnu.org/archive/html/automake/2013-01/msg00051.html
check-local: tests
$(TEST_DRIVER) ./mesos-tests
+
if ENABLE_NEW_CLI
- @source $(builddir)/.virtualenv/bin/activate; \
- $(MESOS_CLI_SRCDIR)/bin/mesos-cli-tests
+ source $(builddir)/.virtualenv/bin/activate; \
+ source $(builddir)/.virtualenv/bin/postactivate; \
+ PATH=$(builddir):$$PATH mesos-cli-tests
endif
if INSTALL_TESTS
diff --git a/src/python/cli_new/tests/CMakeLists.txt b/src/python/cli_new/tests/CMakeLists.txt
index 19119d1..db7b234 100644
--- a/src/python/cli_new/tests/CMakeLists.txt
+++ b/src/python/cli_new/tests/CMakeLists.txt
@@ -22,7 +22,8 @@ if (ENABLE_NEW_CLI)
WRITE ${CMAKE_CURRENT_BINARY_DIR}/run_cli_tests.sh
"set -e
source ${CMAKE_CURRENT_BINARY_DIR}/../.virtualenv/bin/activate
- ${CMAKE_CURRENT_SOURCE_DIR}/../bin/mesos-cli-tests")
+ source ${CMAKE_CURRENT_BINARY_DIR}/../.virtualenv/bin/postactivate
+ PATH=${CMAKE_BINARY_DIR}/src:$PATH mesos-cli-tests")
add_custom_target(
cli-tests