benchbuild.utils.versions module

Gather version information for BB.

benchbuild.utils.versions.get_git_hash(from_url)[source]

Get the git commit hash of HEAD from :from_url.

Parameters:from_url – The file system url of our git repository.
Returns:git commit hash of HEAD, or empty string.
benchbuild.utils.versions.get_version_from_cache_dir(src_file)[source]

Creates a version for a project out of the hash.

The hash is taken from the directory of the source file.

Parameters:src_file – The source file of the project using this function.
Returns:Either returns the first 8 digits of the hash as string, the entire hash as a string if the hash consists out of less than 7 digits or None if the path is incorrect.