1# Configuration for testlib and its tests, to instrument with
2# FrogLogic's Squish CoCo (cf. testcocoon.prf, which handles similar
3# for general code; but testlib needs special handling).
4
5# Only for use when feature testlib_selfcover is enabled:
6!qtConfig(testlib_selfcover): return()
7
8# This enables verification that testlib itself is adequately tested,
9# as a grounds for trusting that testing with it is useful.
10# Exclude all non-testlib source from coverage instrumentation:
11COVERAGE_OPTIONS = --cs-exclude-file-abs-wildcard=$$QT_SOURCE_TREE/*
12COVERAGE_OPTIONS += --cs-include-file-abs-wildcard=*/src/testlib/*
13COVERAGE_OPTIONS += --cs-mcc # enable Multiple Condition Coverage
14COVERAGE_OPTIONS += --cs-mcdc # enable Multiple Condition / Decision Coverage
15# (recommended for ISO 26262 ASIL A, B and C -- highly recommended for ASIL D)
16# https://doc.froglogic.com/squish-coco/4.1/codecoverage.html#sec%3Amcdc
17
18QMAKE_CFLAGS += $$COVERAGE_OPTIONS
19QMAKE_CXXFLAGS += $$COVERAGE_OPTIONS
20QMAKE_LFLAGS += $$COVERAGE_OPTIONS
21
22# FIXME: relies on QMAKE_* being just the command-names, with no path prefix
23QMAKE_CC = cs$$QMAKE_CC
24QMAKE_CXX = cs$$QMAKE_CXX
25QMAKE_LINK = cs$$QMAKE_LINK
26QMAKE_LINK_SHLIB = cs$$QMAKE_LINK_SHLIB
27QMAKE_AR = cs$$QMAKE_AR
28QMAKE_LIB = cs$$QMAKE_LIB
29