Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
C
caosdb-cpplib
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
caosdb
Software
caosdb-cpplib
Commits
81e01d43
Verified
Commit
81e01d43
authored
3 years ago
by
Timm Fitschen
Browse files
Options
Downloads
Patches
Plain Diff
WIP: pipeline
parent
4efeface
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
.gitlab-ci.yml
+59
-0
59 additions, 0 deletions
.gitlab-ci.yml
test/.docker/Dockerfile
+6
-0
6 additions, 0 deletions
test/.docker/Dockerfile
test/test_connection.c
+2
-2
2 additions, 2 deletions
test/test_connection.c
with
67 additions
and
2 deletions
.gitlab-ci.yml
0 → 100644
+
59
−
0
View file @
81e01d43
#
# This file is a part of the CaosDB Project.
#
# Copyright (C) 2019-2021 Indiscale GmbH <info@indiscale.com>
# Copyright (C) 2019 Henrik tom Wörden <h.tomwoerden@indiscale.com>
# Copyright (C) 2020 Daniel Hornung <d.hornung@indiscale.com>
# Copyright (C) 2021 Timm Fitschen <t.fitschen@indiscale.com>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU Affero General Public License as
# published by the Free Software Foundation, either version 3 of the
# License, or (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU Affero General Public License for more details.
#
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <https://www.gnu.org/licenses/>.
#
variables
:
CI_REGISTRY_IMAGE
:
$CI_REGISTRY/caosdb/src/caosdb-clib/testenv:latest
image
:
$CI_REGISTRY_IMAGE
stages
:
-
setup
-
test
# Build a docker image in which tests for this repository can run
build-testenv
:
tags
:
[
cached-dind
]
image
:
docker:20.10
stage
:
setup
script
:
-
docker login -u gitlab-ci-token -p $CI_JOB_TOKEN $CI_REGISTRY
# use here general latest or specific branch latest...
-
docker pull $CI_REGISTRY_IMAGE||
true
-
docker build
-f test/.docker/Dockerfile
--pull
--cache-from $CI_REGISTRY_IMAGE
-t $CI_REGISTRY_IMAGE .
-
docker push $CI_REGISTRY_IMAGE
# cmocka tests
test
:
tags
:
[
docker
]
stage
:
test
script
:
-
mkdir test_build
-
cd test_build
-
cmake -DCMAKE_BUILD_TYPE=Debug ..
-
cmake --build .
-
ctest
This diff is collapsed.
Click to expand it.
test/.docker/Dockerfile
0 → 100644
+
6
−
0
View file @
81e01d43
FROM
debian:latest
RUN
apt-get update
&&
\
apt-get
install
-y
\
cmake
COPY
./ caosdb-clib/
This diff is collapsed.
Click to expand it.
test/test_connection.c
+
2
−
2
View file @
81e01d43
#include
"connection.h"
#include
<cmocka.h>
#include
<setjmp.h>
#include
<stdarg.h>
#include
<stddef.h>
#include
<cmocka.h>
#include
"connection.h"
static
void
test_configure_connection
(
void
**
state
)
{
assert_int_equal
(
0
,
configure_connection
(
"localhost"
,
8080
));
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment