summaryrefslogtreecommitdiff
path: root/test
diff options
context:
space:
mode:
authorKonstantin Käfer <mail@kkaefer.com>2014-10-24 17:39:18 +0200
committerKonstantin Käfer <mail@kkaefer.com>2014-10-24 17:44:51 +0200
commit0e928b5204ad5e2a8cfc1dd1a993396be0bd9d87 (patch)
tree1eca3f4f0446c07c38d93049d48a6272b2c989d6 /test
parentd299e580886353e0813d30f9dee74639f899924a (diff)
downloadqtlocation-mapboxgl-0e928b5204ad5e2a8cfc1dd1a993396be0bd9d87.tar.gz
make tests work
Diffstat (limited to 'test')
-rw-r--r--test/headless.cpp4
-rw-r--r--test/test.gyp320
2 files changed, 139 insertions, 185 deletions
diff --git a/test/headless.cpp b/test/headless.cpp
index 02dd0165ec..e1bdbdc061 100644
--- a/test/headless.cpp
+++ b/test/headless.cpp
@@ -9,8 +9,8 @@
#include <rapidjson/writer.h>
#include <rapidjson/stringbuffer.h>
-#include "../common/headless_view.hpp"
-#include "../common/headless_display.hpp"
+#include <mbgl/platform/default/headless_view.hpp>
+#include <mbgl/platform/default/headless_display.hpp>
#include "./fixtures/fixture_log.hpp"
diff --git a/test/test.gyp b/test/test.gyp
index 49cc33739d..04287bd9a8 100644
--- a/test/test.gyp
+++ b/test/test.gyp
@@ -1,200 +1,154 @@
{
'includes': [
- '../common.gypi',
+ '../gyp/common.gypi',
+ '../gyp/platform.gypi',
],
'targets': [
- {
- 'target_name': 'link_gl',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_LDFLAGS': [
- '<@(glfw3_libraries)', # This is a hack since we're not actually using GLFW
- ],
- },
- }, {
- 'link_settings': {
- 'libraries': [
- '<@(glfw3_libraries)', # This is a hack since we're not actually using GLFW
- '-lboost_regex',
- ],
- },
- }],
- ],
- },
+ { 'target_name': 'rotation_range',
+ 'product_name': 'test_rotation_range',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './rotation_range.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ ]
},
- {
- 'target_name': 'link_curl',
- 'type': 'none',
- 'direct_dependent_settings': {
- 'conditions': [
- ['OS == "mac"', {
- 'xcode_settings': {
- 'OTHER_CPLUSPLUSFLAGS':[
- '<@(curl_cflags)',
- ],
- 'OTHER_LDFLAGS': [
- '<@(curl_libraries)',
- ],
- },
- }, {
- 'cflags': [
- '<@(curl_cflags)',
- ],
- 'link_settings': {
- 'libraries': [
- '<@(curl_libraries)',
- ],
- },
- }],
- ],
- },
+ { 'target_name': 'clip_ids',
+ 'product_name': 'test_clip_ids',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './clip_ids.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ ]
},
- {
- "target_name": "rotation_range",
- "product_name": "test_rotation_range",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./rotation_range.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- ]
- },
- {
- "target_name": "clip_ids",
- "product_name": "test_clip_ids",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./clip_ids.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- ]
- },
- {
- "target_name": "enums",
- "product_name": "test_enums",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./enums.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- ]
+ { 'target_name': 'enums',
+ 'product_name': 'test_enums',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './enums.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ ]
},
- {
- "target_name": "style_parser",
- "product_name": "test_style_parser",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./style_parser.cpp",
- "./fixtures/fixture_log.hpp",
- "./fixtures/fixture_log.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- "../mapboxgl.gyp:copy_fixtures",
- ]
+ { 'target_name': 'style_parser',
+ 'product_name': 'test_style_parser',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './style_parser.cpp',
+ './fixtures/fixture_log.hpp',
+ './fixtures/fixture_log.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ '../mapboxgl.gyp:copy_fixtures',
+ ]
},
- {
- "target_name": "variant",
- "product_name": "test_variant",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./variant.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- ]
+ { 'target_name': 'variant',
+ 'product_name': 'test_variant',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './variant.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ ]
},
- {
- "target_name": "comparisons",
- "product_name": "test_comparisons",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./comparisons.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- ]
+ { 'target_name': 'comparisons',
+ 'product_name': 'test_comparisons',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './comparisons.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ ]
},
- {
- "target_name": "tile",
- "product_name": "test_tile",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./tile.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- ]
+ { 'target_name': 'tile',
+ 'product_name': 'test_tile',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './tile.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ ]
},
- {
- "target_name": "functions",
- "product_name": "test_functions",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./functions.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
+ { 'target_name': 'functions',
+ 'product_name': 'test_functions',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './functions.cpp',
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
]
},
- {
- "target_name": "headless",
- "product_name": "test_headless",
- "type": "executable",
- "sources": [
- "./main.cpp",
- "./headless.cpp",
- "../common/headless_view.hpp",
- "../common/headless_view.cpp",
- "../common/headless_display.hpp",
- "../common/headless_display.cpp",
- "../common/platform_default.cpp",
- "./fixtures/fixture_request.cpp",
- "./fixtures/fixture_log.hpp",
- "./fixtures/fixture_log.cpp",
- ],
- "dependencies": [
- "../deps/gtest/gtest.gyp:gtest",
- "../mapboxgl.gyp:mapboxgl",
- "link_gl",
- ]
+ { 'target_name': 'headless',
+ 'product_name': 'test_headless',
+ 'type': 'executable',
+ 'sources': [
+ './main.cpp',
+ './headless.cpp',
+ './fixtures/fixture_request.cpp',
+ './fixtures/fixture_log.cpp',
+ '../platform/default/headless_view.cpp',
+ '../platform/default/headless_display.cpp',
+ ],
+ 'conditions': [
+ # add libuv include path and OpenGL libs
+ ['OS == "mac"',
+ {
+ 'xcode_settings': {
+ 'OTHER_CPLUSPLUSFLAGS': ['<@(uv_cflags)'],
+ 'OTHER_LDFLAGS': ['<@(glfw3_libraries)'],
+ },
+ },
+ {
+ 'cflags': ['<@(uv_cflags)'],
+ 'libraries': ['<@(glfw3_libraries)'],
+ }],
+ ],
+ 'dependencies': [
+ '../deps/gtest/gtest.gyp:gtest',
+ '../mapboxgl.gyp:mapboxgl',
+ '<(platform_library)',
+ ],
},
- {
- "target_name": "test",
- "type": "none",
- "dependencies": [
- "rotation_range",
- "clip_ids",
- "enums",
- "variant",
- "tile",
- "functions",
- "headless",
- "style_parser",
- "comparisons",
- ],
+
+ # Build all targets
+ { 'target_name': 'test',
+ 'type': 'none',
+ 'dependencies': [
+ 'rotation_range',
+ 'clip_ids',
+ 'enums',
+ 'variant',
+ 'tile',
+ 'functions',
+ 'headless',
+ 'style_parser',
+ 'comparisons',
+ ],
}
]
}