From d19c38de176da7a3e14a60ca9235f9719284144c Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 1 Sep 2016 16:59:18 -0700 Subject: [PATCH 01/17] upgrade ccache / convert to generic travis language --- .travis.yml | 10 ++++------ bootstrap.sh | 2 +- 2 files changed, 5 insertions(+), 7 deletions(-) diff --git a/.travis.yml b/.travis.yml index 331979c2a..0a266f878 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,4 +1,4 @@ -language: cpp +language: generic git: depth: 10 @@ -25,7 +25,7 @@ matrix: - os: linux sudo: false compiler: ": clang" - env: JOBS=8 MASON_PUBLISH=true _CXX="ccache clang++-3.8 -Qunused-arguments" _CC="clang-3.8" TRIGGER=true + env: JOBS=8 MASON_PUBLISH=true CXX="ccache clang++-3.8 -Qunused-arguments" CC="clang-3.8" TRIGGER=true addons: apt: sources: [ 'ubuntu-toolchain-r-test'] @@ -33,7 +33,7 @@ matrix: - os: linux sudo: false compiler: ": clang-coverage" - env: JOBS=8 COVERAGE=true _CXX="ccache clang++-3.8 -Qunused-arguments" _CC="clang-3.8" + env: JOBS=8 COVERAGE=true CXX="ccache clang++-3.8 -Qunused-arguments" CC="clang-3.8" addons: apt: sources: [ 'ubuntu-toolchain-r-test'] @@ -42,7 +42,7 @@ matrix: compiler: ": clang-osx" # https://docs.travis-ci.com/user/languages/objective-c/#Supported-OS-X-iOS-SDK-versions osx_image: xcode7.3 # upgrades clang from 6 -> 7 - env: JOBS=4 MASON_PUBLISH=true _CXX="ccache clang++ -Qunused-arguments" + env: JOBS=4 MASON_PUBLISH=true CXX="ccache clang++ -Qunused-arguments" before_install: # workaround travis rvm bug @@ -51,8 +51,6 @@ before_install: if [[ "${TRAVIS_OS_NAME}" == "osx" ]]; then rvm get head || true fi - - if [[ ${_CXX:-false} != false ]]; then export CXX=${_CXX}; fi - - if [[ ${_CC:-false} != false ]]; then export CC=${_CC}; fi - source scripts/travis-common.sh - export PYTHONUSERBASE=$(pwd)/mason_packages/.link - export PATH=${PREFIX}/bin:$(pwd)/mason_packages/.link/bin:${PYTHONUSERBASE}/bin:${PATH} diff --git a/bootstrap.sh b/bootstrap.sh index 2234ef08f..7946805c9 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -48,7 +48,7 @@ ICU_VERSION="55.1" function install_mason_deps() { FAIL=0 - install ccache 3.2.4 & + install ccache 3.3.0 & install jpeg_turbo 1.5.0 libjpeg & install libpng 1.6.24 libpng & install libtiff 4.0.6 libtiff & From 7075a361cc743e956523787b8a0060291a72209e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 1 Sep 2016 18:13:06 -0700 Subject: [PATCH 02/17] try travis-command-wrapper.py to help cache get created even on job that timed out - refs travis-ci/travis-ci#4472 --- .travis.yml | 2 +- scripts/travis-command-wrapper.py | 104 ++++++++++++++++++++++++++++++ 2 files changed, 105 insertions(+), 1 deletion(-) create mode 100755 scripts/travis-command-wrapper.py diff --git a/.travis.yml b/.travis.yml index 0a266f878..3a603a784 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,7 +92,7 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - - make + - scripts/travis-command-wrapper.py make - make test - enabled ${COVERAGE} coverage - enabled ${BENCH} make bench diff --git a/scripts/travis-command-wrapper.py b/scripts/travis-command-wrapper.py new file mode 100755 index 000000000..eb7a794ab --- /dev/null +++ b/scripts/travis-command-wrapper.py @@ -0,0 +1,104 @@ +#!/usr/bin/python +# +# Author: Patrick Ohly +# Copyright: Copyright (C) 2015 Intel Corporation +# +# This file is licensed under the MIT license, see COPYING.MIT in +# this source distribution for the terms. + +# Runs a command, pipes its output to stdout, and injects status +# reports at regular time interval. +# +# This ensures that TravisCI does not abort the command just because +# it is silent for more than 10 minutes, as it can happen with bitbake +# when working on a single complex task, like "bitbake linux-yocto". +# +# Piping bitbake stdout has the advantage that bitbake enters +# non-interactive output mode, which it would do when run by TravisCI +# directly. +# +# Finally, the default status messages give some sense of memory +# and disk usage, which is critical in the rather constrained +# TravisCI environments. + +import errno +import optparse +import signal +import subprocess +import sys +import time + +parser = optparse.OptionParser() +parser.add_option("-s", "--status", + help="invoked in a shell when it is time for a status report", + # 200 columns is readable in the TravisCI Web UI without wrapping. + # Depends of course on screen and font size. Resizing top output + # only works (and is needed) on the more recent Trusty TravisCI + # environment. + default="date; free; df -h .; COLUMNS=200 LINES=30 top -w -b -n 1 2>/dev/null || top -n 1; ps x --cols 200 --forest", + metavar="SHELL-CMD") +parser.add_option("-i", "--interval", + help="repeat status at intervals of this amount of seconds, 0 to disable", + default=300, + metavar="SECONDS", type="int") +parser.add_option("-d", "--deadline", + help="stop execution when reaching the given time", + default=time.time, + metavar="SECONDS-SINCE-EPOCH", type="int") + +(options, args) = parser.parse_args() + +def check_deadline(now): + if options.deadline > 0 and options.deadline < now: + print "\n\n*** travis-cmd-wrapper: deadline reached, shutting down ***\n\n" + sys.exit(1) + +# Set up status alarm. When we have a deadline, we need to check more often +# and/or sooner. Sending a SIGALRM manually will also trigger a status report +# (not really possible in TravisCI, but may be useful elsewhere). +now = time.time() +next_status = now + options.interval +alarm_interval = max(options.interval, 0) +if options.deadline: + check_deadline(now) + if options.deadline < now + 60: + # Wake up a little too late, to be sure that we trigger the if check. + deadline_alarm_interval = max(int(options.deadline + 2 - now), 1) + elif next_status > 60: + deadline_alarm_interval = 60 + if deadline_alarm_interval < alarm_interval: + alarm_interval = deadline_alarm_interval + +def status(signum, frame): + global next_status + now = time.time() + if options.interval < 0 or now >= next_status: + subprocess.call(options.status, shell=True) + next_status = now + options.interval + check_deadline(now) + if alarm_interval > 0: + signal.alarm(alarm_interval) + +# Run command. +try: + cmd = subprocess.Popen(args, stdout=subprocess.PIPE) + + # Arm timer and handler. + signal.signal(signal.SIGALRM, status) + if alarm_interval > 0: + signal.alarm(alarm_interval) + + while cmd.poll() is None: + try: + line = cmd.stdout.readline() + sys.stdout.write(line) + sys.stdout.flush() + except IOError, ex: + if ex.errno != errno.EINTR: + raise +finally: + # If we go down, so must our child... + if cmd.poll() is None: + cmd.kill() + +exit(1 if cmd.returncode else 0) \ No newline at end of file From 5a21b1fc05703d8187043f170e709d8a1989dd10 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Thu, 1 Sep 2016 18:53:55 -0700 Subject: [PATCH 03/17] better wrapper args --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 3a603a784..68505741b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,7 +92,7 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - - scripts/travis-command-wrapper.py make + - scripts/travis-command-wrapper.py -s "date;ps aux | grep ${CXX}" -i 60 make - make test - enabled ${COVERAGE} coverage - enabled ${BENCH} make bench From 687af49f47448e32e522006212502d9c3d9dad0e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 12:00:57 -0700 Subject: [PATCH 04/17] bump BOOST_VERSION --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index 34ddc3b6a..8d1e95453 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -1,6 +1,6 @@ environment: msvs_toolset: 14 - BOOST_VERSION: 60 + BOOST_VERSION: 61 FASTBUILD: 1 matrix: - platform: x64 From 09ec0ba7092b702a23d9b922529acc3d45c77661 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 12:09:19 -0700 Subject: [PATCH 05/17] stop build at 25 minutes (well before travis fails the job at 50) to ensure at least partial ccache results are uploaded --- .travis.yml | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 68505741b..a2567a14a 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,7 +92,14 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - - scripts/travis-command-wrapper.py -s "date;ps aux | grep ${CXX}" -i 60 make + # we limit the `make` to 25 min + # to ensure that slow builds still upload their + # ccache results and therefore should be faster + # for the next build + - DURATION=1500 + - start=$(date +%s) + - deadline=$(( $start + $DURATION * 60 - 10 * 60 )) + - scripts/travis-command-wrapper.py -s "date;ps aux | grep ${CXX}" -i 60 --deadline=$deadline make - make test - enabled ${COVERAGE} coverage - enabled ${BENCH} make bench From 35d9435952196dbd9263c177fb3ad7f3fc24b7e1 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 12:56:00 -0700 Subject: [PATCH 06/17] appveyor: only upload test failures not all visual tests --- appveyor.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 8d1e95453..d4450d7a4 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ build_script: - scripts\build-appveyor.bat after_build: - - 7z a mapnik-visual-images.zip C:\tmp\mapnik-visual-images + - 7z a visual-test-results.zip C:\tmp\mapnik-visual-images\visual-test-results artifacts: - path: mapnik-gyp\msbuild-summary.txt @@ -33,8 +33,8 @@ artifacts: name: msbuild-errors.txt - path: mapnik-gyp\msbuild-warnings.txt name: msbuild-warnings.txt - - path: mapnik-visual-images.zip - name: mapnik-visual-images.zip + - path: visual-test-results.zip + name: visual-test-results.zip test: off deploy: off From 73715afdb82e51b11a6c91645446bf7a973733a9 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 14:44:35 -0700 Subject: [PATCH 07/17] travis: fix broken grep --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index a2567a14a..6a6c03587 100644 --- a/.travis.yml +++ b/.travis.yml @@ -99,7 +99,7 @@ script: - DURATION=1500 - start=$(date +%s) - deadline=$(( $start + $DURATION * 60 - 10 * 60 )) - - scripts/travis-command-wrapper.py -s "date;ps aux | grep ${CXX}" -i 60 --deadline=$deadline make + - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$deadline make - make test - enabled ${COVERAGE} coverage - enabled ${BENCH} make bench From fa44f0e247a27cb9f9a3b0c90df1b78a36b436c5 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 15:09:45 -0700 Subject: [PATCH 08/17] Add memory_datasource test + fix returning of invalid_featureset for emptyset --- src/memory_datasource.cpp | 8 ++++++ test/unit/datasource/memory.cpp | 46 +++++++++++++++++++++++++++++++++ 2 files changed, 54 insertions(+) create mode 100644 test/unit/datasource/memory.cpp diff --git a/src/memory_datasource.cpp b/src/memory_datasource.cpp index 3c182207b..1127f4b83 100644 --- a/src/memory_datasource.cpp +++ b/src/memory_datasource.cpp @@ -117,12 +117,20 @@ datasource::datasource_t memory_datasource::type() const featureset_ptr memory_datasource::features(const query& q) const { + if (features_.empty()) + { + return mapnik::make_invalid_featureset(); + } return std::make_shared(q.get_bbox(),*this,bbox_check_); } featureset_ptr memory_datasource::features_at_point(coord2d const& pt, double tol) const { + if (features_.empty()) + { + return mapnik::make_invalid_featureset(); + } box2d box = box2d(pt.x, pt.y, pt.x, pt.y); box.pad(tol); MAPNIK_LOG_DEBUG(memory_datasource) << "memory_datasource: Box=" << box << ", Point x=" << pt.x << ",y=" << pt.y; diff --git a/test/unit/datasource/memory.cpp b/test/unit/datasource/memory.cpp new file mode 100644 index 000000000..514e645ba --- /dev/null +++ b/test/unit/datasource/memory.cpp @@ -0,0 +1,46 @@ +/***************************************************************************** + * + * This file is part of Mapnik (c++ mapping toolkit) + * + * Copyright (C) 2015 Artem Pavlenko + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; either + * version 2.1 of the License, or (at your option) any later version. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + * + *****************************************************************************/ + +#include "catch.hpp" +#include "ds_test_util.hpp" + +#include +#include +#include +#include + + +TEST_CASE("memory datasource") { + + SECTION("empty featureset") + { + mapnik::parameters params; + mapnik::datasource_ptr ds = std::make_shared(params); + CHECK(ds != nullptr); + auto fs = all_features(ds); + REQUIRE(!mapnik::is_valid(fs)); + while (auto f = fs->next()) + { + CHECK(false); // shouldn't get here + } + } +} From acd90042fbc0f2374db30e80b01c43e550c88a63 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 15:51:58 -0700 Subject: [PATCH 09/17] geojson.input: minor code adjustments - Avoids making copy of inline string to save memory - Moves duplicated code out of #ifdef to be more readible --- plugins/input/geojson/geojson_datasource.cpp | 31 +++++++------------- plugins/input/geojson/geojson_datasource.hpp | 2 +- 2 files changed, 11 insertions(+), 22 deletions(-) diff --git a/plugins/input/geojson/geojson_datasource.cpp b/plugins/input/geojson/geojson_datasource.cpp index 90270873d..2709c532d 100644 --- a/plugins/input/geojson/geojson_datasource.cpp +++ b/plugins/input/geojson/geojson_datasource.cpp @@ -113,18 +113,14 @@ geojson_datasource::geojson_datasource(parameters const& params) desc_(geojson_datasource::name(), *params.get("encoding","utf-8")), filename_(), - inline_string_(), + from_inline_string_(false), extent_(), features_(), tree_(nullptr), num_features_to_query_(*params.get("num_features_to_query",5)) { boost::optional inline_string = params.get("inline"); - if (inline_string) - { - inline_string_ = *inline_string; - } - else + if (!inline_string) { boost::optional file = params.get("file"); if (!file) throw mapnik::datasource_exception("GeoJSON Plugin: missing parameter"); @@ -137,10 +133,11 @@ geojson_datasource::geojson_datasource(parameters const& params) has_disk_index_ = mapnik::util::exists(filename_ + ".index"); } - if (!inline_string_.empty()) + if (inline_string) { - char const* start = inline_string_.c_str(); - char const* end = start + inline_string_.size(); + from_inline_string_ = true; + char const* start = inline_string->c_str(); + char const* end = start + inline_string->size(); parse_geojson(start, end); } else if (has_disk_index_) @@ -162,14 +159,6 @@ geojson_datasource::geojson_datasource(parameters const& params) std::fread(&file_buffer[0], file.size(), 1, file.get()); char const* start = file_buffer.c_str(); char const* end = start + file_buffer.length(); - if (cache_features_) - { - parse_geojson(start, end); - } - else - { - initialise_index(start, end); - } #else boost::optional mapped_region = mapnik::mapped_memory_cache::instance().find(filename_, false); @@ -180,6 +169,7 @@ geojson_datasource::geojson_datasource(parameters const& params) char const* start = reinterpret_cast((*mapped_region)->get_address()); char const* end = start + (*mapped_region)->get_size(); +#endif if (cache_features_) { parse_geojson(start, end); @@ -188,7 +178,6 @@ geojson_datasource::geojson_datasource(parameters const& params) { initialise_index(start, end); } -#endif } } @@ -276,7 +265,7 @@ void geojson_datasource::initialise_index(Iterator start, Iterator end) space); if (!result || itr != end) { - if (!inline_string_.empty()) throw mapnik::datasource_exception("geojson_datasource: Failed to parse GeoJSON file from in-memory string"); + if (from_inline_string_) throw mapnik::datasource_exception("geojson_datasource: Failed to parse GeoJSON file from in-memory string"); else throw mapnik::datasource_exception("geojson_datasource: Failed to parse GeoJSON file '" + filename_ + "'"); } @@ -368,7 +357,7 @@ void geojson_datasource::parse_geojson(Iterator start, Iterator end) space); if (!result || itr != end) { - if (!inline_string_.empty()) throw mapnik::datasource_exception("geojson_datasource: Failed parse GeoJSON file from in-memory string"); + if (from_inline_string_) throw mapnik::datasource_exception("geojson_datasource: Failed parse GeoJSON file from in-memory string"); else throw mapnik::datasource_exception("geojson_datasource: Failed parse GeoJSON file '" + filename_ + "'"); } } @@ -382,7 +371,7 @@ void geojson_datasource::parse_geojson(Iterator start, Iterator end) space); if (!result || itr != end) { - if (!inline_string_.empty()) throw mapnik::datasource_exception("geojson_datasource: Failed parse GeoJSON file from in-memory string"); + if (from_inline_string_) throw mapnik::datasource_exception("geojson_datasource: Failed parse GeoJSON file from in-memory string"); else throw mapnik::datasource_exception("geojson_datasource: Failed parse GeoJSON file '" + filename_ + "'"); } } diff --git a/plugins/input/geojson/geojson_datasource.hpp b/plugins/input/geojson/geojson_datasource.hpp index 5ba36a66b..e295cb1d6 100644 --- a/plugins/input/geojson/geojson_datasource.hpp +++ b/plugins/input/geojson/geojson_datasource.hpp @@ -98,7 +98,7 @@ private: mapnik::datasource::datasource_t type_; mapnik::layer_descriptor desc_; std::string filename_; - std::string inline_string_; + bool from_inline_string_; mapnik::box2d extent_; std::vector features_; std::unique_ptr tree_; From 57331a40cebad943031b4e2da5e72eb13469cf50 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 17:19:22 -0700 Subject: [PATCH 10/17] try to get travis-command-wrapper deadline working --- .travis.yml | 6 ++---- scripts/travis-command-wrapper.py | 2 ++ 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.travis.yml b/.travis.yml index 6a6c03587..e47003b7d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -96,10 +96,8 @@ script: # to ensure that slow builds still upload their # ccache results and therefore should be faster # for the next build - - DURATION=1500 - - start=$(date +%s) - - deadline=$(( $start + $DURATION * 60 - 10 * 60 )) - - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$deadline make + - DURATION=500 + - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$(( $(date +%s) + ${DURATION} )) make - make test - enabled ${COVERAGE} coverage - enabled ${BENCH} make bench diff --git a/scripts/travis-command-wrapper.py b/scripts/travis-command-wrapper.py index eb7a794ab..2fdf8dc88 100755 --- a/scripts/travis-command-wrapper.py +++ b/scripts/travis-command-wrapper.py @@ -52,6 +52,8 @@ def check_deadline(now): if options.deadline > 0 and options.deadline < now: print "\n\n*** travis-cmd-wrapper: deadline reached, shutting down ***\n\n" sys.exit(1) + else: + print "deadline not reached: %s > %s" % (options.deadline,now) # Set up status alarm. When we have a deadline, we need to check more often # and/or sooner. Sending a SIGALRM manually will also trigger a status report From 7dcf8eac356a2948128c22f824770ce58dacbf17 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 17:47:40 -0700 Subject: [PATCH 11/17] increase deadline to 15 min --- .travis.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index e47003b7d..c33a8ae09 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,11 +92,11 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - # we limit the `make` to 25 min + # we limit the `make` to 15 min # to ensure that slow builds still upload their # ccache results and therefore should be faster - # for the next build - - DURATION=500 + # (and might work) for the next build + - DURATION=900 - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$(( $(date +%s) + ${DURATION} )) make - make test - enabled ${COVERAGE} coverage From c67e505a741562b49e88a8bf97b227e0b8dcc409 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 17:52:02 -0700 Subject: [PATCH 12/17] mason: install zlib system symlink to ensure consistently zlib linking [skip ci] --- bootstrap.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/bootstrap.sh b/bootstrap.sh index 7946805c9..e926c26bc 100755 --- a/bootstrap.sh +++ b/bootstrap.sh @@ -49,6 +49,7 @@ ICU_VERSION="55.1" function install_mason_deps() { FAIL=0 install ccache 3.3.0 & + install zlib system & install jpeg_turbo 1.5.0 libjpeg & install libpng 1.6.24 libpng & install libtiff 4.0.6 libtiff & From 3be9a623fc5987de787f740e21510cd75ee5595e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 19:06:07 -0700 Subject: [PATCH 13/17] travis: up to 25 min limit --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index c33a8ae09..f93bd098d 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,11 +92,11 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - # we limit the `make` to 15 min + # we limit the `make` to 25 min # to ensure that slow builds still upload their # ccache results and therefore should be faster # (and might work) for the next build - - DURATION=900 + - DURATION=1500 - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$(( $(date +%s) + ${DURATION} )) make - make test - enabled ${COVERAGE} coverage From c3f7d947a61cbf407c942e2e2ec8006894d068e7 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 2 Sep 2016 21:12:08 -0700 Subject: [PATCH 14/17] travis: up to 35 min limit --- .travis.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.travis.yml b/.travis.yml index f93bd098d..8cb0b9f73 100644 --- a/.travis.yml +++ b/.travis.yml @@ -92,11 +92,11 @@ script: - export SCONSFLAGS='--debug=time' - configure BENCHMARK=${BENCH} - cat config.log - # we limit the `make` to 25 min + # we limit the `make` to 35 min # to ensure that slow builds still upload their # ccache results and therefore should be faster # (and might work) for the next build - - DURATION=1500 + - DURATION=2100 - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$(( $(date +%s) + ${DURATION} )) make - make test - enabled ${COVERAGE} coverage From 076ab1fa6c2cdd8a27ea2f726ab62faa2e20269e Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sat, 3 Sep 2016 09:31:26 -0700 Subject: [PATCH 15/17] fix mason cflags/ldflags return --- mason_latest.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mason_latest.sh b/mason_latest.sh index d5db6963f..cf064953b 100755 --- a/mason_latest.sh +++ b/mason_latest.sh @@ -53,11 +53,11 @@ function mason_compile { } function mason_cflags { - "" + : } function mason_ldflags { - "" + : } function mason_clean { From e580d0b1d6631227ecee051a91d49033e37006e1 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sat, 3 Sep 2016 09:32:20 -0700 Subject: [PATCH 16/17] simplify travis-command-wrapper.py output --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 8cb0b9f73..2e54ffb1b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -97,7 +97,7 @@ script: # ccache results and therefore should be faster # (and might work) for the next build - DURATION=2100 - - scripts/travis-command-wrapper.py -s "date;ps aux | grep clang" -i 60 --deadline=$(( $(date +%s) + ${DURATION} )) make + - scripts/travis-command-wrapper.py -s "date" -i 120 --deadline=$(( $(date +%s) + ${DURATION} )) make - make test - enabled ${COVERAGE} coverage - enabled ${BENCH} make bench From 3741a7f348f936668e2dd195f461ca60df8582fb Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sat, 3 Sep 2016 09:58:40 -0700 Subject: [PATCH 17/17] fix -Wshadow warnings caught by g++-5 --- include/mapnik/image_view_any.hpp | 4 ++-- include/mapnik/warning_ignore.hpp | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/include/mapnik/image_view_any.hpp b/include/mapnik/image_view_any.hpp index 23c9779d8..a5452df0b 100644 --- a/include/mapnik/image_view_any.hpp +++ b/include/mapnik/image_view_any.hpp @@ -47,9 +47,9 @@ struct MAPNIK_DECL image_view_any : image_view_base image_view_any() = default; template - image_view_any(T && data) + image_view_any(T && _data) noexcept(std::is_nothrow_constructible::value) - : image_view_base(std::forward(data)) {} + : image_view_base(std::forward(_data)) {} std::size_t width() const; std::size_t height() const; diff --git a/include/mapnik/warning_ignore.hpp b/include/mapnik/warning_ignore.hpp index 95249b8bf..6be432f0b 100644 --- a/include/mapnik/warning_ignore.hpp +++ b/include/mapnik/warning_ignore.hpp @@ -28,7 +28,8 @@ #pragma GCC diagnostic ignored "-Wunused-function" #pragma GCC diagnostic ignored "-Wunused-parameter" #pragma GCC diagnostic ignored "-Wredeclared-class-member" -#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wunused-local-typedef" +#pragma GCC diagnostic ignored "-Wunused-local-typedefs" // gcc5 #pragma GCC diagnostic ignored "-Wshadow" #pragma GCC diagnostic ignored "-Wc++11-narrowing" #pragma GCC diagnostic ignored "-Wsign-conversion"