Skip to content
Snippets Groups Projects
Commit b8535938 authored by Vladimír Čunát's avatar Vladimír Čunát
Browse files

Merge !701: CI clang tools: 5.0 -> 7.0

parents 2385eddf 5a90597d
Branches
Tags
1 merge request!701CI clang tools: 5.0 -> 7.0
Pipeline #42353 passed with warnings with stages
in 9 minutes and 41 seconds
......@@ -43,10 +43,10 @@ build:clang:linux:amd64:
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-unstable:knot-2.7 # newer Debian for newer Clang
script:
- rm daemon/lua/kres-gen.lua
- CXX=clang++-5.0 CC=clang-5.0 make -k all "CFLAGS=-Werror -Wno-error=unused-command-line-argument -ggdb"
- CXX=clang++ CC=clang make -k all "CFLAGS=-Werror -Wno-error=unused-command-line-argument -ggdb"
- STATUS="$(git status --untracked-files=normal --porcelain)"
- test -n "${STATUS}" && echo "${STATUS}" && echo "Build + install made working tree dirty, did you forget to update something?" && exit 2
- CXX=clang++-5.0 CC=clang-5.0 make install "CFLAGS=-Werror -ggdb"
- CXX=clang++ CC=clang make install "CFLAGS=-Werror -ggdb"
tags:
- docker
- linux
......@@ -87,7 +87,7 @@ lint:c:
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-unstable:knot-2.7 # newer Debian for newer Clang
dependencies: [] # do not download build artifacts
script:
- make lint-c CLANG_TIDY="clang-tidy-5.0 -quiet"
- make lint-c CLANG_TIDY="clang-tidy -quiet"
tags:
- docker
......@@ -99,7 +99,7 @@ lint:clang-scan-build:
image: $CI_REGISTRY/knot/knot-resolver/ci/debian-unstable:knot-2.7 # newer Debian for newer Clang
dependencies: [] # do not download build artifacts
script:
- MAKEFLAGS="-k -j$(nproc)" SCAN_BUILD="/usr/lib/llvm-5.0/bin/scan-build -o scan-results --status-bugs -no-failure-reports" ./tests/clang_scan_build.sh make
- MAKEFLAGS="-k -j$(nproc)" SCAN_BUILD="scan-build -o scan-results --status-bugs -no-failure-reports" ./tests/clang_scan_build.sh make
artifacts:
when: on_failure
expire_in: '1 day'
......
......@@ -39,5 +39,5 @@ RUN luarocks install luacov
# LuaJIT binary for stand-alone scripting
RUN apt-get install -y -qqq luajit
# clang for kresd CI
RUN apt-get install -y -qqq clang-5.0 clang-tools-5.0 clang-tidy-5.0
# clang for kresd CI, version updated as debian updates it
RUN apt-get install -y -qqq clang clang-tools clang-tidy
......@@ -513,6 +513,14 @@ static void args_init(struct args *args)
args->quiet = false;
}
static long strtol_10(const char *s)
{
if (!s) abort();
/* ^^ This shouldn't ever happen. When getopt_long() returns an option
* character that has a mandatory parameter, optarg can't be NULL. */
return strtol(s, NULL, 10);
}
/** Process arguments into struct args.
* @return >=0 if main() should be exited immediately.
*/
......@@ -546,17 +554,17 @@ static int parse_args(int argc, char **argv, struct args *args)
array_push(args->tls_set, optarg);
break;
case 'S':
array_push(args->fd_set, strtol(optarg, NULL, 10));
array_push(args->fd_set, strtol_10(optarg));
break;
case 'T':
array_push(args->tls_fd_set, strtol(optarg, NULL, 10));
array_push(args->tls_fd_set, strtol_10(optarg));
break;
case 'c':
args->config = optarg;
break;
case 'f':
args->interactive = false;
args->forks = strtol(optarg, NULL, 10);
args->forks = strtol_10(optarg);
if (args->forks <= 0) {
kr_log_error("[system] error '-f' requires a positive"
" number, not '%s'\n", optarg);
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment