summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDane Springmeyer <dane@mapbox.com>2017-02-08 18:41:30 -0800
committerDane Springmeyer <dane@mapbox.com>2017-02-08 18:41:30 -0800
commitcf7b724c923e12b9fccca290c1ff333bb49351f4 (patch)
treef03ddab13c63da0b1adf8da5176fabff61a17424
parent94a3c272ffd6676edbe59342d70bca49aaf676a5 (diff)
downloadqtlocation-mapboxgl-cf7b724c923e12b9fccca290c1ff333bb49351f4.tar.gz
enable clang 3.9 + sanitizers
-rw-r--r--.travis.yml67
-rw-r--r--test/api/annotations.test.cpp19
2 files changed, 76 insertions, 10 deletions
diff --git a/.travis.yml b/.travis.yml
index 30c3fa6be6..8c6bbe9293 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -13,6 +13,15 @@ addons:
- &glfw_packages [ 'libxrandr-dev', 'libxcursor-dev', 'libxinerama-dev' ]
addons_shortcuts:
+ addons_clang39: &clang39
+ apt:
+ sources: [ 'ubuntu-toolchain-r-test', ]
+ packages:
+ - *common_packages
+ - ['libstdc++-5-dev', 'libstdc++6']
+ - *egl_packages
+ - *glfw_packages
+addons_shortcuts:
addons_clang38: &clang38
apt:
sources: *common_sources
@@ -81,6 +90,62 @@ matrix:
- git fetch origin master:refs/remotes/origin/master
- make check
+ # EGL - Linux - Clang 3.9 - Debug
+ - os: linux
+ sudo: required
+ dist: trusty
+ language: node
+ compiler: "egl-linux-clang39-debug"
+ env: BUILDTYPE=Debug _CXX=clang++-3.9 _CC=clang-3.9 WITH_EGL=1
+ addons: *clang39
+ before_install:
+ - git submodule update --init
+ - (cd .mason && git checkout master && git pull)
+ - .mason/mason install clang++ 3.9.1
+ - export PATH=$(.mason/mason prefix clang++ 3.9.1)/bin:$PATH
+ - .mason/mason install cmake 3.7.1
+ - export PATH=$(.mason/mason prefix cmake 3.7.1)/bin:$PATH
+ - export CXXFLAGS="-Wno-undefined-var-template -fsanitize=address,undefined"
+ - export LDFLAGS="-fsanitize=address,undefined"
+ before_script:
+ - mapbox_start_xvfb
+ script:
+ - make linux
+ - make benchmark
+ - make test
+ - make run-test
+ after_script:
+ - ccache --show-stats
+ - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER}
+
+ # EGL - Node - Clang 3.9 - Debug
+ - os: linux
+ sudo: required
+ dist: trusty
+ language: node
+ compiler: "egl-node4-clang39-debug"
+ env: BUILDTYPE=Debug _CXX=clang++-3.9 _CC=clang-3.9 WITH_EGL=1
+ addons: *clang39
+ before_install:
+ - git submodule update --init
+ - .mason/mason install clang++ 3.9.1
+ - export PATH=$(.mason/mason prefix clang++ 3.9.1)/bin:$PATH
+ - .mason/mason install cmake 3.7.1
+ - export PATH=$(.mason/mason prefix cmake 3.7.1)/bin:$PATH
+ - export CXXFLAGS="-Wno-undefined-var-template -fsanitize=address,undefined"
+ - export LDFLAGS="-fsanitize=address,undefined"
+ before_script:
+ - mapbox_start_xvfb
+ script:
+ - nvm install 4
+ - nvm use 4
+ - make node
+ - export LD_PRELOAD=$(.mason/mason prefix clang++ 3.9.1)/lib/clang/3.9.1/lib/linux/libclang_rt.asan-x86_64.so
+ - make test-node
+ after_script:
+ - ccache --show-stats
+ - ./platform/node/scripts/after_script.sh ${TRAVIS_JOB_NUMBER}
+
# EGL - Node - Clang 3.8 - Debug
- os: linux
sudo: required
@@ -199,4 +264,4 @@ cache:
notifications:
slack:
- secure: HHQYr7sF8M1SzoWSqgKVYtwAgGdLLCyTMsQjFhEEQNYO92ZwURE5s03qWTGH5k8+4Yqn26yrXt3NztLC4JIOpcGervN2mSZyq4dZgFTcWEd61igw0qwSenlwvFfbE1ASK/KYCzfyn9MIfHN+ovwLoRxXZkPwinKDvl3DXjBaFNg=
+ secure: HHQYr7sF8M1SzoWSqgKVYtwAgGdLLCyTMsQjFhEEQNYO92ZwURE5s03qWTGH5k8+4Yqn26yrXt3NztLC4JIOpcGervN2mSZyq4dZgFTcWEd61igw0qwSenlwvFfbE1ASK/KYCzfyn9MIfHN+ovwLoRxXZkPwinKDvl3DXjBaFNg= \ No newline at end of file
diff --git a/test/api/annotations.test.cpp b/test/api/annotations.test.cpp
index 9ac3369284..b64b5750e9 100644
--- a/test/api/annotations.test.cpp
+++ b/test/api/annotations.test.cpp
@@ -70,10 +70,11 @@ TEST(Annotations, LineAnnotation) {
test.checkRendering("line_annotation_max_zoom");
}
+
TEST(Annotations, FillAnnotation) {
AnnotationTest test;
- Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
+ Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} };
FillAnnotation annotation { polygon };
annotation.color = Color::red();
@@ -98,7 +99,7 @@ TEST(Annotations, AntimeridianAnnotationSmall) {
lineAnnotation.width = { 2 };
test.map.addAnnotation(lineAnnotation);
- Polygon<double> polygon = {{ {{ { antimeridian+10, 0 }, { antimeridian - 10, 10 }, { antimeridian-10, -10 } }} }};
+ Polygon<double> polygon = { {{ { antimeridian+10, 0 }, { antimeridian - 10, 10 }, { antimeridian-10, -10 } }} };
FillAnnotation polygonAnnotation { polygon };
polygonAnnotation.color = Color::blue();
test.map.addAnnotation(polygonAnnotation);
@@ -119,7 +120,7 @@ TEST(Annotations, AntimeridianAnnotationLarge) {
lineAnnotation.width = { 2 };
test.map.addAnnotation(lineAnnotation);
- Polygon<double> polygon = {{ {{ { antimeridian-10, 0 }, { -antimeridian+10, 10 }, { -antimeridian+10, -10 } }} }};
+ Polygon<double> polygon = { {{ { antimeridian-10, 0 }, { -antimeridian+10, 10 }, { -antimeridian+10, -10 } }} };
FillAnnotation polygonAnnotation { polygon };
polygonAnnotation.color = Color::blue();
test.map.addAnnotation(polygonAnnotation);
@@ -130,7 +131,7 @@ TEST(Annotations, AntimeridianAnnotationLarge) {
TEST(Annotations, OverlappingFillAnnotation) {
AnnotationTest test;
- Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
+ Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} };
FillAnnotation underlaidAnnotation { polygon };
underlaidAnnotation.color = Color::green();
FillAnnotation overlaidAnnotation { polygon };
@@ -145,7 +146,7 @@ TEST(Annotations, OverlappingFillAnnotation) {
TEST(Annotations, StyleSourcedShapeAnnotation) {
AnnotationTest test;
- Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
+ Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} };
test.map.setStyleJSON(util::read_file("test/fixtures/api/annotation.json"));
test.map.addAnnotation(StyleSourcedAnnotation { polygon, "annotation" });
@@ -171,7 +172,7 @@ TEST(Annotations, NonImmediateAdd) {
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
test::render(test.map, test.view);
- Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
+ Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} };
FillAnnotation annotation { polygon };
annotation.color = Color::red();
@@ -245,7 +246,7 @@ TEST(Annotations, UpdateLineAnnotationStyle) {
TEST(Annotations, UpdateFillAnnotationGeometry) {
AnnotationTest test;
- FillAnnotation annotation { Polygon<double> {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }} };
+ FillAnnotation annotation { Polygon<double> { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} } };
annotation.color = Color::red();
test.map.setStyleJSON(util::read_file("test/fixtures/api/empty.json"));
@@ -253,7 +254,7 @@ TEST(Annotations, UpdateFillAnnotationGeometry) {
test::render(test.map, test.view);
- annotation.geometry = Polygon<double> {{ {{ { 0, 0 }, { 0, 45 }, { 45, 0 } }} }};
+ annotation.geometry = Polygon<double> { {{ { 0, 0 }, { 0, 45 }, { 45, 0 } }} };
test.map.updateAnnotation(fill, annotation);
test.checkRendering("update_fill_geometry");
}
@@ -261,7 +262,7 @@ TEST(Annotations, UpdateFillAnnotationGeometry) {
TEST(Annotations, UpdateFillAnnotationStyle) {
AnnotationTest test;
- Polygon<double> polygon = {{ {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} }};
+ Polygon<double> polygon = { {{ { 0, 0 }, { 0, 45 }, { 45, 45 }, { 45, 0 } }} };
FillAnnotation annotation { polygon };
annotation.color = Color::red();