xref: /third_party/curl/scripts/coverage.sh (revision 13498266)
113498266Sopenharmony_ci#!/bin/sh
213498266Sopenharmony_ci#***************************************************************************
313498266Sopenharmony_ci#                                  _   _ ____  _
413498266Sopenharmony_ci#  Project                     ___| | | |  _ \| |
513498266Sopenharmony_ci#                             / __| | | | |_) | |
613498266Sopenharmony_ci#                            | (__| |_| |  _ <| |___
713498266Sopenharmony_ci#                             \___|\___/|_| \_\_____|
813498266Sopenharmony_ci#
913498266Sopenharmony_ci# Copyright (C) Daniel Stenberg, <daniel@haxx.se>, et al.
1013498266Sopenharmony_ci#
1113498266Sopenharmony_ci# This software is licensed as described in the file COPYING, which
1213498266Sopenharmony_ci# you should have received as part of this distribution. The terms
1313498266Sopenharmony_ci# are also available at https://curl.se/docs/copyright.html.
1413498266Sopenharmony_ci#
1513498266Sopenharmony_ci# You may opt to use, copy, modify, merge, publish, distribute and/or sell
1613498266Sopenharmony_ci# copies of the Software, and permit persons to whom the Software is
1713498266Sopenharmony_ci# furnished to do so, under the terms of the COPYING file.
1813498266Sopenharmony_ci#
1913498266Sopenharmony_ci# This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
2013498266Sopenharmony_ci# KIND, either express or implied.
2113498266Sopenharmony_ci#
2213498266Sopenharmony_ci# SPDX-License-Identifier: curl
2313498266Sopenharmony_ci#
2413498266Sopenharmony_ci###########################################################################
2513498266Sopenharmony_ci
2613498266Sopenharmony_ciautoreconf -fi
2713498266Sopenharmony_cimkdir -p cvr
2813498266Sopenharmony_cicd cvr
2913498266Sopenharmony_ci../configure --disable-shared --enable-debug --enable-maintainer-mode --enable-code-coverage
3013498266Sopenharmony_cimake -sj
3113498266Sopenharmony_ci# the regular test run
3213498266Sopenharmony_cimake TFLAGS=-n test-nonflaky
3313498266Sopenharmony_ci# make all allocs/file operations fail
3413498266Sopenharmony_ci#make TFLAGS=-n test-torture
3513498266Sopenharmony_ci# do everything event-based
3613498266Sopenharmony_cimake TFLAGS=-n test-event
3713498266Sopenharmony_cilcov -d . -c -o cov.lcov
3813498266Sopenharmony_cigenhtml cov.lcov --output-directory coverage --title "curl code coverage"
3913498266Sopenharmony_citar -cjf curl-coverage.tar.bz2 coverage
40