Parasoft C/C++test is a unified, fully integrated testing solution for C and C++ software development. C/C++test uses a comprehensive set of analysis techniques, including pattern-based static analysis, dataflow analysis, metrics, code coverage, and more, to help you verify code quality and ensure compliance with industry standards, such as MISRA, AUTOSAR, and CERT.
This image is based on Debian Linux and includes:
/opt/parasoft/cpptest)gcc, g++)make, cmake)git, mc, vim, wget, curl, fontconfig, sudo, openssh-client)parasoft.eula.accepted from false to true in the examples below.To license Parasoft C/C++test, create a cpptestcli.properties configuration file with the license settings:
# Accept the Parasoft EULA to use this product
parasoft.eula.accepted=false
# Specify the license edition or features
cpptest.license.use_network=true
cpptest.license.network.edition=server_compliance_edition
# For license retrieved from License Server:
license.network.url=<HOST>:<PORT>
license.network.use.specified.server=true
# For license retrieved from DTP Server:
dtp.url=<HOST>:<PORT>
dtp.user=<USER>
dtp.password=<PASSWORD>
The cpptestcli.properties file should be placed in one of the following locations accessible inside the running container:
-settings flag: cpptestcli -settings /path/to/cpptestcli.properties ..../home/parasoft or /opt/parasoft/cpptest directory inside the image. See Image customization.$ docker run --rm parasoft/cpptest cpptestcli$ docker run --rm parasoft/cpptest cmake -S . -B build$ docker run --rm parasoft/cpptest make clean all$ docker run --rm -it parasoft/cpptest bashIn this example, a Makefile project is located inside the container. The current working directory ($PWD) will be mounted to the running container, so that the cpptestcli.properties configuration file can be accessed by C/C++test. Also, the analysis report will be generated in the mounted directory ($PWD/reports).
$PWD/cpptestcli.properties configuration file (see Licensing).cpptestcli command to launch the analysis in the project root directory (/opt/parasoft/cpptest/examples/ATM) :$ docker run --rm -v $PWD:$PWD -w /opt/parasoft/cpptest/examples/ATM parasoft/cpptest cpptestcli -compiler gcc_14-64 -config "builtin://Recommended Rules" -settings $PWD/cpptestcli.properties -report $PWD/reports -module . -trace make clean all$PWD/reports.In this example, a CMake project is located on the host in the current working directory ($PWD). The directory will be mounted to the running container, so that all project files and the cpptestcli.properties configuration file can be accessed by C/C++test. Also, the analysis report will be generated in the mounted directory ($PWD/reports).
$PWD/cpptestcli.properties configuration file (see Licensing).cpptestcli command to launch the analysis in the mounted directory ($PWD):$ docker run --rm -v $PWD:$PWD -w $PWD parasoft/cpptest bash -c "cmake -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -S . -B build && cpptestcli -compiler gcc_14-64 -config 'builtin://Recommended Rules' -module . -input build/compile_commands.json"$PWD/reports.In this example, a CMake project is located inside the container and the code coverage analysis will be enabled for the project. All the following steps will be performed interactively inside the container (alternatively, they all can be automated / scripted).
$ docker run --rm -it parasoft/cpptest bashcpptestcli.properties configuration file in the $HOME directory (see Licensing).$$ cd /opt/parasoft/cpptest/examples/Timer$$ cmake -DCPPTEST_HOME=/opt/parasoft/cpptest -DCPPTEST_COVERAGE=ON -S . -B build$$ cd build && make$$ ./timer$$ make cpptest_coverage_report/opt/parasoft/cpptest/examples/Timer/build/cpptest-coverage/Timer/reports.You can customize the Parasoft C/C++test image. The following example shows a Dockerfile for building a C/C++test image with GNU GCC 12 compiler and C/C++test configuration file copied into the $HOME directory:
FROM parasoft/cpptest
# install gcc-12
# be sure to use the 'root' user to install new packages
USER root
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends gcc-12 && \
rm -rf /var/lib/apt/lists/*
# pre-configure C/C++test by copying cpptestcli.properties into the $HOME directory
# be sure to restore default 'parasoft' user
USER parasoft:parasoft
COPY cpptestcli.properties /home/parasoft/
You need to view and agree to the Parasoft End User License Agreement (EULA) for the software contained in this image.
As with all Docker images, these likely also contain other software which may be under other licenses. As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.
Content type
Image
Digest
sha256:7f9526af3…
Size
513.5 MB
Last updated
15 days ago
docker pull parasoft/cpptest