From 14e8c708ed2e9980033ad05da69f2c4799dab5b0 Mon Sep 17 00:00:00 2001 From: clanmills Date: Sun, 13 Sep 2020 10:27:02 +0100 Subject: [PATCH] Fix #1300 --- .travis.yml | 8 ++++---- tests/bash_tests/utils.py | 6 ++++-- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index 5e354e06..83391951 100644 --- a/.travis.yml +++ b/.travis.yml @@ -10,7 +10,7 @@ matrix: dist: xenial sudo: required compiler: gcc - env: COVERAGE=0 CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Debug -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DBUILD_WITH_COVERAGE=OFF -DEXIV2_ENABLE_CURL=ON cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS=-Wno-deprecated" + env: COVERAGE=0 CMAKE_OPTIONS=".. -DCMAKE_BUILD_TYPE=Debug -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DBUILD_WITH_COVERAGE=OFF -DEXIV2_ENABLE_CURL=ON -DCMAKE_CXX_FLAGS=-Wno-deprecated" - os: linux dist: xenial @@ -18,18 +18,18 @@ matrix: compiler: gcc env: - WITH_VALGRIND=1 - - CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_CURL=ON cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS=-Wno-deprecated" + - CMAKE_OPTIONS=".. -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_CURL=ON -DCMAKE_CXX_FLAGS=-Wno-deprecated" - os: linux dist: xenial sudo: required compiler: clang - env: CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_CURL=ON cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS=-Wno-deprecated" + env: CMAKE_OPTIONS=".. -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_CURL=ON -DCMAKE_CXX_FLAGS=-Wno-deprecated" - os: osx osx_image: xcode11.3 compiler: clang - env: CMAKE_OPTIONS="-DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_CURL=ON cmake .. -DCMAKE_CXX_STANDARD=11 -DCMAKE_CXX_FLAGS=-Wno-deprecated" + env: CMAKE_OPTIONS=".. -DCMAKE_BUILD_TYPE=Release -DEXIV2_ENABLE_VIDEO=ON -DEXIV2_ENABLE_WEBREADY=ON -DEXIV2_BUILD_UNIT_TESTS=ON -DEXIV2_ENABLE_NLS=OFF -DEXIV2_ENABLE_CURL=ON -DCMAKE_CXX_FLAGS=-Wno-deprecated" install: ./ci/install.sh script: ./ci/run.sh diff --git a/tests/bash_tests/utils.py b/tests/bash_tests/utils.py index 6a3005a1..4bb7f61c 100644 --- a/tests/bash_tests/utils.py +++ b/tests/bash_tests/utils.py @@ -290,7 +290,7 @@ class HttpServer: log.info('Starting HTTP server ...') self.proc = multiprocessing.Process(target=self._start, name=str(self)) self.proc.start() - time.sleep(1) + time.sleep(2) try: with request.urlopen('http://127.0.0.1:{}'.format(self.port), timeout=3) as f: if f.status != 200: @@ -410,7 +410,9 @@ class Executer: # Execute the command in subprocess try: - with subprocess.Popen(self.args, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=stderr, cwd=self.cwd) as self.subprocess: + my_env = os.environ.copy() + my_env['TZ'] = 'GMT-8' + with subprocess.Popen(self.args,env=my_env, stdin=subprocess.PIPE, stdout=subprocess.PIPE, stderr=stderr, cwd=self.cwd) as self.subprocess: try: output = self.subprocess.communicate(self.stdin, timeout=10) # Assign (stdout, stderr) to output except subprocess.TimeoutExpired: