diff options
author | Daiki Ueno <ueno@unixuser.org> | 2018-06-09 04:51:58 +0000 |
---|---|---|
committer | Daiki Ueno <ueno@unixuser.org> | 2018-06-09 04:51:58 +0000 |
commit | d5788bd0158bf67521a81c21abd31a14f3bf6393 (patch) | |
tree | b7ed9de8160468946874a1f9f390def1eef6b7c7 | |
parent | 0ec60173bc806441cefd56789a505b83e25d4947 (diff) | |
parent | 79ca2bd319970991ec537d855fe228fcaf5a3301 (diff) | |
download | libsecret-d5788bd0158bf67521a81c21abd31a14f3bf6393.tar.gz |
Merge branch 'wip/dueno/gitlab-ci' into 'master'
build: Enable gitlab-ci
See merge request GNOME/libsecret!1
-rw-r--r-- | .gitlab-ci.yml | 76 | ||||
-rwxr-xr-x | build/tap-driver | 6 | ||||
-rw-r--r-- | libsecret/test-methods.c | 10 | ||||
-rw-r--r-- | libsecret/test-password.c | 10 | ||||
-rw-r--r-- | libsecret/test-paths.c | 19 |
5 files changed, 81 insertions, 40 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..94b3792 --- /dev/null +++ b/.gitlab-ci.yml @@ -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 diff --git a/build/tap-driver b/build/tap-driver index 07f2835..61ed084 100755 --- a/build/tap-driver +++ b/build/tap-driver @@ -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 diff --git a/libsecret/test-methods.c b/libsecret/test-methods.c index 3964155..c0aecd4 100644 --- a/libsecret/test-methods.c +++ b/libsecret/test-methods.c @@ -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, diff --git a/libsecret/test-password.c b/libsecret/test-password.c index e379283..b745427 100644 --- a/libsecret/test-password.c +++ b/libsecret/test-password.c @@ -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, diff --git a/libsecret/test-paths.c b/libsecret/test-paths.c index 631ce13..b703344 100644 --- a/libsecret/test-paths.c +++ b/libsecret/test-paths.c @@ -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; |