Resolve "Various issues with dependency scripts"
requested to merge amiranda/176-using-d-option-in-dl_dep-sh-ends-up-downloading-all-dependencies into master
This MR adds some tests for the scripts based on 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 theCOMPILER_NAME
,COMPILER_FULL_VERSION
, andCOMPILER_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
:
-
Using -d
option indl_dep.sh
ends up downloading all dependencies (#176 (closed)) -
Specifying a full profile in dl_dep.sh
with-d
does not work (#177 (closed)) -
dl_deps.sh
can download the same dependency in several versions but unpacks them into the same directory (#178 (closed)) -
libfabric experimental not working (#180 (closed)) -
psm2 is viewed as a dependency when in fact it is build as part of libfabric. Thereforeif [[ "$((${#wgetdeps[@]}+${#clonedeps[@]}))" -ne "${#order[@]}" ]]; then
fails (#180 (closed)) -
rocksdb experimental not working (#180 (closed)) -
rocksdb install of newer versions needs PREFIX for(Moving to CMake for 0.9.0make install
to specify install path (#180 (closed)) -
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. -
Dependency patches are being skipped (#184 (closed)). -
Script should use script directory as pwd
instead ofbash_pwd
?
Closes #176 (closed) #177 (closed) #178 (closed) #180 (closed) #184 (closed)
Edited by Alberto Miranda