Include excluded tests in coverage report, use xorg-dummy-driver (#1193)
This commit is contained in:
6
.github/workflows/linux-ci.yml
vendored
6
.github/workflows/linux-ci.yml
vendored
@@ -185,7 +185,9 @@ jobs:
|
|||||||
libuv1-dev \
|
libuv1-dev \
|
||||||
libjpeg-dev \
|
libjpeg-dev \
|
||||||
libpng-dev \
|
libpng-dev \
|
||||||
libglfw3-dev
|
libglfw3-dev \
|
||||||
|
xserver-xorg-video-dummy \
|
||||||
|
xinit
|
||||||
|
|
||||||
- name: Cache Bazel
|
- name: Cache Bazel
|
||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
@@ -202,7 +204,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Generate coverage report
|
- name: Generate coverage report
|
||||||
run: |
|
run: |
|
||||||
bazel coverage --test_output=all --combined_report=lcov --instrumentation_filter="//:mbgl-core" //test:core --//:maplibre_platform=linux --run_under="xvfb-run -a"
|
bazel coverage --test_output=all --combined_report=lcov --instrumentation_filter="//:mbgl-core" //test:core --//:maplibre_platform=linux --run_under=//platform/linux:startxwrapper
|
||||||
echo coverage_report=$(bazel info output_path)/_coverage/_coverage_report.dat >> $GITHUB_ENV
|
echo coverage_report=$(bazel info output_path)/_coverage/_coverage_report.dat >> $GITHUB_ENV
|
||||||
|
|
||||||
- name: Upload coverage report
|
- name: Upload coverage report
|
||||||
|
|||||||
@@ -86,6 +86,9 @@ config_setting(
|
|||||||
)
|
)
|
||||||
|
|
||||||
exports_files(
|
exports_files(
|
||||||
["LICENSE.md"],
|
[
|
||||||
|
"LICENSE.md",
|
||||||
|
"scripts/style-spec-reference/v8.json",
|
||||||
|
],
|
||||||
visibility = ["//visibility:public"],
|
visibility = ["//visibility:public"],
|
||||||
)
|
)
|
||||||
|
|||||||
@@ -30,3 +30,8 @@ cc_library(
|
|||||||
"//platform/default:mbgl-default",
|
"//platform/default:mbgl-default",
|
||||||
],
|
],
|
||||||
)
|
)
|
||||||
|
|
||||||
|
sh_binary(
|
||||||
|
name = "startxwrapper",
|
||||||
|
srcs = ["xorg/startxwrapper"],
|
||||||
|
)
|
||||||
|
|||||||
5
platform/linux/xorg/README.md
Normal file
5
platform/linux/xorg/README.md
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
# Xorg dummy driver
|
||||||
|
|
||||||
|
This directory contains an `xorg.conf` that uses the Xorg dummy driver.
|
||||||
|
|
||||||
|
It can be used as an alternative to `xvfb-run`.
|
||||||
8
platform/linux/xorg/startxwrapper
Executable file
8
platform/linux/xorg/startxwrapper
Executable file
@@ -0,0 +1,8 @@
|
|||||||
|
#!/usr/bin/bash
|
||||||
|
|
||||||
|
script=$(realpath "$0")
|
||||||
|
scriptpath=$(dirname "$script")
|
||||||
|
|
||||||
|
exit_code=$(mktemp)
|
||||||
|
XAUTHORITY=$(mktemp) startx "$PWD/$@ && echo $? > $exit_code" -- -xf86config "$scriptpath/xorg.conf" -logfile /dev/null
|
||||||
|
exit $(cat $exit_code)
|
||||||
35
platform/linux/xorg/xorg.conf
Normal file
35
platform/linux/xorg/xorg.conf
Normal file
@@ -0,0 +1,35 @@
|
|||||||
|
# This xorg.conf is used with the xserver-xorg-video-dummy driver in the workflows
|
||||||
|
|
||||||
|
Section "Monitor"
|
||||||
|
Identifier "Monitor0"
|
||||||
|
HorizSync 28.0-80.0
|
||||||
|
VertRefresh 48.0-75.0
|
||||||
|
# 1024x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 64.11 MHz
|
||||||
|
# Modeline "1024x768_60.00" 64.11 1024 1080 1184 1344 768 769 772 795 -HSync +Vsync
|
||||||
|
# 1280x720 @ 60.00 Hz (GTF) hsync: 44.76 kHz; pclk: 74.48 MHz
|
||||||
|
# Modeline "1280x720_60.00" 74.48 1280 1336 1472 1664 720 721 724 746 -HSync +Vsync
|
||||||
|
# 1368x768 @ 60.00 Hz (GTF) hsync: 47.70 kHz; pclk: 85.86 MHz
|
||||||
|
# Modeline "1368x768_60.00" 85.86 1368 1440 1584 1800 768 769 772 795 -HSync +Vsync
|
||||||
|
# 1600x900 @ 60.00 Hz (GTF) hsync: 55.92 kHz; pclk: 119.00 MHz
|
||||||
|
# Modeline "1600x900_60.00" 119.00 1600 1696 1864 2128 900 901 904 932 -HSync +Vsync
|
||||||
|
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz
|
||||||
|
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Device"
|
||||||
|
Identifier "Card0"
|
||||||
|
Option "NoDDC" "true"
|
||||||
|
Option "IgnoreEDID" "true"
|
||||||
|
Driver "dummy"
|
||||||
|
EndSection
|
||||||
|
|
||||||
|
Section "Screen"
|
||||||
|
DefaultDepth 16
|
||||||
|
Identifier "Screen0"
|
||||||
|
Device "Card0"
|
||||||
|
Monitor "Monitor0"
|
||||||
|
SubSectionSub "Display"
|
||||||
|
Depth 16
|
||||||
|
Modes "1920x1080"
|
||||||
|
EndSubSection
|
||||||
|
EndSection
|
||||||
@@ -39,16 +39,14 @@ cc_test(
|
|||||||
[
|
[
|
||||||
"**/*.test.cpp",
|
"**/*.test.cpp",
|
||||||
],
|
],
|
||||||
exclude = [
|
|
||||||
"storage/sync_file_source.test.cpp",
|
|
||||||
"util/timer.test.cpp",
|
|
||||||
"style/expression/expression.test.cpp",
|
|
||||||
"map/map.test.cpp",
|
|
||||||
],
|
|
||||||
),
|
),
|
||||||
|
args = [
|
||||||
|
"--gtest_filter=-Map.StyleNetworkErrorRetry:Map.StyleNotFound",
|
||||||
|
],
|
||||||
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
|
copts = CPP_FLAGS + MAPLIBRE_FLAGS,
|
||||||
data = glob(["fixtures/**/*"]),
|
data = glob(["fixtures/**/*"]) + [
|
||||||
local = True,
|
"//:scripts/style-spec-reference/v8.json",
|
||||||
|
],
|
||||||
deps = [
|
deps = [
|
||||||
"testlib",
|
"testlib",
|
||||||
"testutils",
|
"testutils",
|
||||||
|
|||||||
@@ -9,6 +9,8 @@
|
|||||||
#include <mbgl/util/run_loop.hpp>
|
#include <mbgl/util/run_loop.hpp>
|
||||||
#include <stdexcept>
|
#include <stdexcept>
|
||||||
#include <unordered_map>
|
#include <unordered_map>
|
||||||
|
#include "mbgl/storage/resource_options.hpp"
|
||||||
|
#include "mbgl/util/client_options.hpp"
|
||||||
|
|
||||||
#include <gtest/gtest.h>
|
#include <gtest/gtest.h>
|
||||||
|
|
||||||
@@ -35,13 +37,13 @@ public:
|
|||||||
assets.emplace(key, std::make_shared<std::string>(data));
|
assets.emplace(key, std::make_shared<std::string>(data));
|
||||||
};
|
};
|
||||||
|
|
||||||
virtual void setResourceOptions(ResourceOptions _) override { throw std::runtime_error("Not implemented"); }
|
virtual void setResourceOptions(ResourceOptions) override {}
|
||||||
|
|
||||||
virtual ResourceOptions getResourceOptions() override { throw std::runtime_error("Not implemented"); }
|
virtual ResourceOptions getResourceOptions() override { return ResourceOptions{}; }
|
||||||
|
|
||||||
virtual void setClientOptions(ClientOptions) override { throw std::runtime_error("Not implemented"); }
|
virtual void setClientOptions(ClientOptions) override {}
|
||||||
|
|
||||||
virtual ClientOptions getClientOptions() { throw std::runtime_error("Not implemented"); }
|
virtual ClientOptions getClientOptions() { return ClientOptions{}; }
|
||||||
|
|
||||||
private:
|
private:
|
||||||
std::unordered_map<std::string, std::shared_ptr<std::string>> assets;
|
std::unordered_map<std::string, std::shared_ptr<std::string>> assets;
|
||||||
|
|||||||
Reference in New Issue
Block a user