From 7dc0f7e6c199a4380717d0856bd628a2c70661ad Mon Sep 17 00:00:00 2001 From: "F.Tibor" Date: Wed, 3 Sep 2025 17:50:00 +0200 Subject: [PATCH] Add opensource project: zlib --- test/foss/zlib/init.sh | 57 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 test/foss/zlib/init.sh diff --git a/test/foss/zlib/init.sh b/test/foss/zlib/init.sh new file mode 100644 index 00000000..da02fc7e --- /dev/null +++ b/test/foss/zlib/init.sh @@ -0,0 +1,57 @@ +#!/bin/bash + +# Copyright 2023 Ericsson AB +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +git clone --recurse https://github.com/madler/zlib.git test-proj +cd test-proj +git checkout 5a82f71ed1dfc0bec044d9702463dbdf84ea3b71 + +# This file must be in the root of the project to be analyzed for bazelisk to work +cp ../../templates/.bazelversion ./.bazelversion + +# Add codechecker to the project +cat <> BUILD.bazel +#------------------------------------------------------- + +# codechecker rules +load( + "@bazel_codechecker//src:codechecker.bzl", + "codechecker_test", +) +load( + "@bazel_codechecker//src:code_checker.bzl", + "code_checker_test", +) + + +codechecker_test( + name = "codechecker_test", + targets = [ + ":z", + ], +) + +code_checker_test( + name = "code_checker_test", + targets = [ + ":z", + ], +) + +#------------------------------------------------------- +EOF + +# Add codechecker_bazel repo to WORKSPACE +cat ../../templates/WORKSPACE.template >> WORKSPACE