Tips: Switching from a Global configuration to a Committed configuration
It is recommended to read first the Configuration files section which explain the differences between a Global configuration and a Committed configuration.
All examples in this section can be replayed with our demo-caesar repository, used for our Introduction tutorial. Feel free to fork this repository to try it by yourself.
The only difference between the two kind of configurations for the Build preparation script is the current working directory (the root of the repository for a Global configuration and the
.trustinsoft
directory for a Committed configuration).Hence adding a
cd ..
at the beginning of the script is enough to switch to a Committed configuration.Global configuration
Committed configuration
#!/bin/bash
set -e
autoconf && ./configure -f
bear make
#!/bin/bash
set -e
cd ..
autoconf && ./configure -f
bear make
The only difference between the two kind of configurations for the Analyses configuration is the paths of files which are relative to the root of the repository for a Global configuration and to the
.trustinsoft
directory for a Committed configuration.Hence using the option
"prefix_path"
for each analysis configuration object allows to switch from a Global configuration to a Committed configuration.Global configuration
Committed configuration
[
{
"name": "Test shift values 7 and -3",
"files": [ "main.c", "caesar.c" ],
"cpp-extra-args": "-I ."
},
{
"name": "Test from program inputs",
"files": [ "main.c", "caesar.c" ],
"cpp-extra-args": "-I .",
"main": "main_with_input",
"val-program-name": "a.out",
"val-args": "|People of Earth, your attention please|7"
}
]
[
{
"prefix_path": "..",
"name": "Test shift values 7 and -3",
"files": [ "main.c", "caesar.c" ],
"cpp-extra-args": "-I ."
},
{
"prefix_path": "..",
"name": "Test from program inputs",
"files": [ "main.c", "caesar.c" ],
"cpp-extra-args": "-I .",
"main": "main_with_input",
"val-program-name": "a.out",
"val-args": "|People of Earth, your attention please|7"
}
]
See also Tips: Factorize options between several analyses to learn how to efficiently add the
"prefix_path"
option to all your analysis configuration objects.