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.

Build preparation script

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 .trustinsoftdirectory for a Committed configuration).

Hence adding a cd .. at the beginning of the script is enough to switch to a Committed configuration.

#!/bin/bash

set -e

autoconf && ./configure -f
bear make

Analyses configuration file

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 .trustinsoftdirectory 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.

[
  {
    "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"
  }
]

See also Tips: Factorize options between several analyses to learn how to efficiently add the "prefix_path"option to all your analysis configuration objects.

Last updated