function concurrent check in 'raw' format
= NAME =
concurrent_check
= SYNOPSIS =
concurrent_check
= DESCRIPTION =
This function is used to prevent multiple tests from using the build area
for a test concurrently. It is called by the [[function_pre_build|pre_build]] function.
concurrent_check uses a local file as a build lock. The lock file (while it exists during the execution of the test) hold the value of BUILD_URL.
If the lock file is present when function is entered, concurrent_check will
enter a while loop querying the jenkins server about the status of the job.
concurrent_check will wait in this loop until Jenkins reports that the job
has finished.
When concurrent_check exits, the lock file will be created, with the value
of build_url. This lockfile is removed after the software from the build
area has been deployed to the target, by the [[function_post_deploy|post_deploy]] function.
= EXAMPLES =
Here are some sample invocations:
{{{#!YellowBox
concurrent_check
}}}
= ENVIRONMENT and ARGUMENTS =
The following environment variables are used by this function:
* TRIPLET - defined in common.sh as ${JOB_NAME}-$PLATFORM
* WORKSPACE
* BUILD_URL
This function takes no positional arguments.
= RETURN =
Returns non-zero on error.
= SOURCE =
Located in ''scripts/functions.sh''
= SEE ALSO =
* [[function_post_deploy|post_deploy]]