@@ -52,7 +52,7 @@ The main script is including a bunch of sub BASH scripts.
...
@@ -52,7 +52,7 @@ The main script is including a bunch of sub BASH scripts.
* ci-scripts/reportBuildLocally.sh
* ci-scripts/reportBuildLocally.sh
* ci-scripts/reportTestLocally.sh
* ci-scripts/reportTestLocally.sh
**NOTE: ci-scripts/runTestOnVM.sh is getting big and will certainly be split to facilate maintenance. Start functions will be also factorized.**
**NOTE: ci-scripts/runTestOnVM.sh is getting big and will certainly be split to facilitate maintenance. Start functions will be also factorized.**
# 3. Main script features #
# 3. Main script features #
...
@@ -75,13 +75,122 @@ for OAI variant build:
...
@@ -75,13 +75,122 @@ for OAI variant build:
* build log file to parse: LOG_PATTERN
* build log file to parse: LOG_PATTERN
* the number of log files to parse: NB_PATTERN_FILES
* the number of log files to parse: NB_PATTERN_FILES
These last 2 variables are very important if you change the build options or if you modify the build system and add more targets to build (especially true for physical simulator).
You can get the list of variant specific variables specifying the variant argument when asking for help:
``` bash
./ci-scripts/oai-ci-vm-tool help variant
--variant flexran-rtc OR -v10( build and test non-OSA )
VM_NAME=ci-flexran-rtc ARCHIVES_LOC=flexran
VM_MEMORY=2048 VM_CPU=4
NB_PATTERN_FILES=1 BUILD_OPTIONS="cmake . && make -j2"
To define a new variant you just need to define a function which name conforms to `function variant__v<n>__<variant_name>` where n and variant_name will respectively define the short and long options for your variant. The function only needs to define the variant dependent variables. For many variables, default values are set in the `check_set_variant` function. When a variant doesn't define the BUILD_OPTIONS variable it cannot be used for the `build``wait` and `create` commands.
The main scripts also allows the definition of non variant-dependant variable via the `--setvar_<variable name> <variable value>` options.
You can get the list of these variables by using `help setvar`:
```BASH
./ci-scripts/oai-ci-vm-tool help setvar
--setvar_<varname> <value> where varname is one of:
VM_OSREL : OS release to use in virtual machines
RUN_EXPERIMENTAL : Enforce execution of variants with EXPERIMENTAL variable set to "true"
```
To add a new non-variant dependant variable you need:
* Add an item to the `AUTHORIZED_VAR` array
* In the `setvar_usage`function, add your help string in the HELP_VAR["<yourvariablename>"] variable.