Requirements
Previous to using MuCPP
To avoid unintentional changes in your code: it is recommended to create a copy
of the system under test before testing it with MuCPP; files
will be under the version control system git once the mutation tool is executed.
Before using MuCPP, you should check that:
- Every file pertaining to the system under test is placed in the root directory or in its subdirectories, deleting the files not needed as much as possible to create a clean copy of the program.
- The system under test is not under a version control system. Also check that there is no a ".gitignore" file, as it might impede the correct operation of MuCPP.
- The files to be mutated should have write permission.
-
The root directory, from where MuCPP will be executed, should not contain:
- A directory called "reports_analyze".
- A file called "tests_output.txt", "times_output.txt" or "comparison_results.txt".
Remove/rename these files in case they exist before using MuCPP as they will be created when running the tool.
In addition, MuCPP processes a file called list_operators.txt which is in the root directory of the system under test. The purpose of these files will be explained later on in this document.
Analysis
In case of using headers located in other directories (out of the root directory),
those header files should be added as system headers and not as user headers.
Thus, MuCPP will not consider these files for mutating them as they are not under
the version control system git. To that end:
- Use option –I for directories with user header files (they will be under git and can be mutated).
- Use option –isystem for directories with system header files (they will not be under git and cannot be mutated).
- Method 1: fixed compilation. Provide "--" at the end of the different commands (see Section "Options"). After "--", clang++ compiler options can be supplied to indicate how the files are compiled. Example: -I for a location of a header file (type clang++ --help to see the options).
-
Method 2: using a compilation database file created previously in the root directory (with the name "compile_commands.json"). In this way, indicating the command to compile the files is not needed.
Visit http://clang.llvm.org/docs/JSONCompilationDatabase.html to know how to create the compilation database file.
Testing
MuCPP is not subject to a testing framework. Nevertheless, to execute
the test suite it is necessary that you have a "Makefile" which includes
the following rules:
MuCPP is provided along with a test library that automatically produce both files. See section "Test suite execution" in "Download and install" and section "Example program" for further information.
- mucpp_clean: clean all files that should be regenerated to execute the test suite.
- mucpp_compilation: compile the mutated program.
- mucpp_test: compile the test suite, generating executable files.
- mucpp_execute: execute the test suite.
- "0" means that the program passes the test case.
- "1" means that the program fails the test case.
MuCPP is provided along with a test library that automatically produce both files. See section "Test suite execution" in "Download and install" and section "Example program" for further information.