From 0be7b20ee340a1501b0b2a935e626af24f555204 Mon Sep 17 00:00:00 2001 From: opacam Date: Sun, 19 May 2019 13:39:34 +0200 Subject: [PATCH 1/2] [ci] Add a background process which will print a message each 9 minutes in CI tests So we can avoid our tests to fail in case that the travis log doesn't produce any output for more than 10 minutes (this is a travis limitation) See also: https://docs.travis-ci.com/user/common-build-problems/#build-times-out-because-no-output-was-received --- .travis.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.travis.yml b/.travis.yml index 2241fd16e7..249d5fa05e 100644 --- a/.travis.yml +++ b/.travis.yml @@ -35,5 +35,10 @@ before_script: # (we ignore test_pythonpackage.py since these run way too long!! test_pythonpackage_basic.py will still be run.) script: + # Run a background process to make sure that travis will not kill our tests in + # case that the travis log doesn't produce any output for more than 10 minutes + - while sleep 540; do echo "==== Still running (travis, don't kill me) ===="; done & - docker build --tag=p4a --file Dockerfile.py3 . - docker run -e CI p4a /bin/sh -c "$COMMAND" + # kill the background process started before run docker + - kill %1 From 215a1bdddd04f9180c882b2755463f3e4ba3a31c Mon Sep 17 00:00:00 2001 From: opacam Date: Sun, 19 May 2019 20:51:56 +0200 Subject: [PATCH 2/2] [ci] Enable the `opencv` recipe for rebuild_updated_recipes Also, we slightly modify the opencv recipe to force build the opencv recipe in CI tests so this way we will make sure that the recently applied fix works as expected for a recipe which requires a long compilation time --- ci/constants.py | 9 --------- pythonforandroid/recipes/opencv/__init__.py | 6 ++---- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/ci/constants.py b/ci/constants.py index 302ff46be1..495eef6e9b 100644 --- a/ci/constants.py +++ b/ci/constants.py @@ -39,10 +39,6 @@ class TargetPython(Enum): 'x3dh', 'pynacl', 'doubleratchet', - # The opencv recipe fails to pass travis tests due to the long processing - # when building it and the lack of console output, so, it's only broken - # for travis, see: https://github.com/kivy/python-for-android/pull/1661 - 'opencv', 'omemo', # requires `libpq-dev` system dependency e.g. for `pg_config` binary 'psycopg2', @@ -72,11 +68,6 @@ class TargetPython(Enum): 'secp256k1', 'ffpyplayer', 'icu', - # https://github.com/kivy/python-for-android/issues/1354 - # The opencv recipe fails to pass travis tests due to the long processing - # when building it and the lack of console output, so, it's only broken - # for travis, see: https://github.com/kivy/python-for-android/pull/1661 - 'opencv', # requires `libpq-dev` system dependency e.g. for `pg_config` binary 'psycopg2', 'protobuf_cpp', diff --git a/pythonforandroid/recipes/opencv/__init__.py b/pythonforandroid/recipes/opencv/__init__.py index 6932bc225c..e52c20de28 100644 --- a/pythonforandroid/recipes/opencv/__init__.py +++ b/pythonforandroid/recipes/opencv/__init__.py @@ -1,10 +1,8 @@ from os.path import join import sh from pythonforandroid.recipe import NDKRecipe -from pythonforandroid.toolchain import ( - current_directory, - shprint, -) +from pythonforandroid.util import current_directory +from pythonforandroid.logger import shprint from multiprocessing import cpu_count