Commit 3e886a85 authored by Alberto Miranda's avatar Alberto Miranda
Browse files

Merge branch...

Merge branch 'amiranda/176-using-d-option-in-dl_dep-sh-ends-up-downloading-all-dependencies' into 'master'

Resolve "Various issues with dependency scripts"

This MR adds some tests for the scripts based on [bats-core](https://github.com/bats-core/bats-core), and enables its automatic execution by the CI.

It also changes the separator for dependency flavors from `:` to `%` to prevent clashing with the version separator for profiles (e.g. `libfabric:experimental@mogon2:latest` was ambiguous to `bash`).

Two new bash functions `determine_compiler()` and `profile_has_dependency()` are added to `compile_dep.sh` that are made available to `install` scripts:

- The `determine_compiler()` function makes its best to determine the default compiler available in the system. Installation scripts can access this information via the `COMPILER_NAME`, `COMPILER_FULL_VERSION`, and `COMPILER_MAJOR_VERSION` variables. 
- The `profile_has_dependency()` function allows installation scripts to check whether another dependency is provided by the currently loaded profile, and act accordingly. The function accepts a bash regex with the search argument.

Additionally, this MR fixes the following problems in `dl_dep.sh` and `compile_dep.sh`:

- [x] Using `-d` option in `dl_dep.sh` ends up downloading all dependencies (#176)
- [x] Specifying a full profile in `dl_dep.sh` with `-d` does not work (#177)
- [x] `dl_deps.sh` can download the same dependency in several versions but unpacks them into the same directory (#178)
- [x] ~~rocksdb install of newer versions needs PREFIX for `make install` to specify install path (#180)~~ (Moving to CMake for 0.9.0
- [x] When `clonedeps` is using a tag/branchname to clone, e.g., `HEAD@v1.12.1`, `clonedeps_args` for the dependency needs explicit space, e.g., `["mercury"]=" --recurse-submodules"` otherwise the script fails.
- [x] Dependency patches are being skipped (#184).
- [x] Script should use script directory as `pwd` instead of `bash_pwd`?


Closes #176 #177 #178 #180 #184

See merge request !111
parents d4896773 25fd2f35
Pipeline #2096 passed with stages
in 23 minutes and 6 seconds
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment