mirror of
https://github.com/openharmony/third_party_vulkan-loader.git
synced 2026-07-19 17:13:36 -04:00
tests: Flock the implicit layer test
Fix #121 Change-Id: I2e060a3ddda3bf919d6be8a3e0af7169ac0fee63
This commit is contained in:
committed by
Jeremy Hayes
parent
c2237b330f
commit
d454224a4d
@@ -101,6 +101,11 @@ RunImplicitLayerTest()
|
||||
echo "ImplicitLayer test PASSED"
|
||||
}
|
||||
|
||||
! RunImplicitLayerTest && echo "ImplicitLayer test FAILED" >&2 && exit 1
|
||||
# Prevent the implicit layer test from running concurrently with itself in another process.
|
||||
# i.e. flock the following command subshell with an automatic file descriptor.
|
||||
filename=${0##*/}
|
||||
(
|
||||
flock "$filedesc" && ! RunImplicitLayerTest && echo "ImplicitLayer test FAILED" >&2 && exit 1
|
||||
){filedesc}>"/tmp/$filename.lockfile"
|
||||
|
||||
popd > /dev/null
|
||||
|
||||
Reference in New Issue
Block a user