Merge branch 'wip/dueno/gitlab-ci' into 'master'

build: Enable gitlab-ci

See merge request 
This commit is contained in:
Daiki Ueno 2018-06-09 04:51:58 +00:00
commit d5788bd015
5 changed files with 81 additions and 40 deletions

76
.gitlab-ci.yml Normal file
View File

@ -0,0 +1,76 @@
stages:
- build
- deploy
variables:
DEPENDENCIES: dbus-x11 gcc gjs make python3-dbus python3-gobject redhat-rpm-config
fedora:Werror:
image: fedora:rawhide
stage: build
before_script:
- dnf install -y 'dnf-command(builddep)'
- dnf builddep -y libsecret
- dnf install -y $DEPENDENCIES
- dbus-uuidgen --ensure
script:
- ./autogen.sh --disable-dependency-tracking --enable-strict
- make -j$(nproc) V=1
- eval `dbus-launch --sh-syntax`
- make -j$(nproc) V=1 distcheck
fedora:asan:
image: fedora:rawhide
stage: build
before_script:
- dnf install -y 'dnf-command(builddep)'
- dnf builddep -y libsecret
- dnf install -y $DEPENDENCIES libasan
- dbus-uuidgen --ensure
script:
- ./autogen.sh --disable-dependency-tracking CFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=address -g -fno-common -U_FORTIFY_SOURCE' LIBS='-lasan -ldl -lpthread'
- make -j$(nproc) V=1
- eval `dbus-launch --sh-syntax`
- make -j$(nproc) V=1 DISABLE_HARD_ERRORS=1 XFAIL_TESTS="\$(JS_TESTS) \$(PY_TESTS)"
fedora:ubsan:
image: fedora:rawhide
stage: build
before_script:
- dnf install -y 'dnf-command(builddep)'
- dnf builddep -y libsecret
- dnf install -y $DEPENDENCIES libubsan
- dbus-uuidgen --ensure
script:
- ./autogen.sh --disable-dependency-tracking CFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' CXXFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LDFLAGS='-fsanitize=undefined -g -fno-common -U_FORTIFY_SOURCE' LIBS='-lubsan -ldl -lpthread'
- make -j$(nproc) V=1
- eval `dbus-launch --sh-syntax`
- make -j$(nproc) V=1 check
fedora:coverage:
image: fedora:rawhide
stage: build
before_script:
- dnf install -y 'dnf-command(builddep)'
- dnf builddep -y libsecret
- dnf install -y $DEPENDENCIES lcov
- dbus-uuidgen --ensure
script:
- ./autogen.sh --disable-dependency-tracking --enable-coverage
- make -j$(nproc) V=1
- eval `dbus-launch --sh-syntax`
- make -j$(nproc) V=1 check
- make coverage
coverage: '/^\s+lines.+:\s+([\d.]+\%)\s+/'
artifacts:
name: "libsecret-${CI_JOB_NAME}-${CI_COMMIT_REF_NAME}"
paths:
- build/coverage/
pages:
stage: deploy
script:
- mv build/coverage/ public/
artifacts:
paths:
- public

View File

@ -43,6 +43,7 @@ class Driver:
self.trs = open(args.trs_file, "w")
self.color_tests = args.color_tests
self.expect_failure = args.expect_failure
self.enable_hard_errors = args.enable_hard_errors
def report(self, code, *args):
CODES = {
@ -92,7 +93,10 @@ class Driver:
self.report("SKIP", *args)
def report_error(self, description=""):
self.report("ERROR", "", description)
if self.enable_hard_errors:
self.report("ERROR", "", description)
else:
self.result_fail(description)
def process(self, output):
pass

View File

@ -39,16 +39,6 @@ static const SecretSchema MOCK_SCHEMA = {
}
};
static const SecretSchema PRIME_SCHEMA = {
"org.mock.Prime",
SECRET_SCHEMA_NONE,
{
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
{ "prime", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
}
};
static const SecretSchema NO_NAME_SCHEMA = {
"unused.Schema.Name",
SECRET_SCHEMA_DONT_MATCH_NAME,

View File

@ -37,16 +37,6 @@ static const SecretSchema MOCK_SCHEMA = {
}
};
static const SecretSchema PRIME_SCHEMA = {
"org.mock.Prime",
SECRET_SCHEMA_NONE,
{
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
{ "prime", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
}
};
static const SecretSchema NO_NAME_SCHEMA = {
"unused.Schema.Name",
SECRET_SCHEMA_DONT_MATCH_NAME,

View File

@ -39,25 +39,6 @@ static const SecretSchema MOCK_SCHEMA = {
}
};
static const SecretSchema PRIME_SCHEMA = {
"org.mock.Prime",
SECRET_SCHEMA_NONE,
{
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
{ "prime", SECRET_SCHEMA_ATTRIBUTE_BOOLEAN },
}
};
static const SecretSchema NO_NAME_SCHEMA = {
"unused.Schema.Name",
SECRET_SCHEMA_DONT_MATCH_NAME,
{
{ "number", SECRET_SCHEMA_ATTRIBUTE_INTEGER },
{ "string", SECRET_SCHEMA_ATTRIBUTE_STRING },
}
};
typedef struct {
SecretService *service;
} Test;