Commit cda620cb authored by TJ Yin's avatar TJ Yin Committed by Facebook GitHub Bot

fix gnu_debuglink_test during parallel test execution

Summary: This diff appended uuid to copied files so that we won't run into race condition when 2 tests are executed at the same time.

Reviewed By: meyering

Differential Revision: D24589043

fbshipit-source-id: edb6b6eb6c8749694bdad15eb8d00d9f8d931cfc
parent 7feb2d37
......@@ -14,13 +14,17 @@
# limitations under the License.
crash="$1"
rm -f "$crash."{debuginfo,strip}
objcopy --only-keep-debug "$crash" "$crash.debuginfo"
objcopy --strip-debug --add-gnu-debuglink="$crash.debuginfo" "$crash" "$crash.strip"
uuid=$(cat /proc/sys/kernel/random/uuid)
for sig in 1 2 3 13 15; do eval "trap 'exit $((sig + 128))' $sig"; done
trap 'rm -f "$crash.debuginfo.$uuid" "$crash.strip.$uuid"' 0
objcopy --only-keep-debug "$crash" "$crash.debuginfo.$uuid"
objcopy --strip-debug --add-gnu-debuglink="$crash.debuginfo.$uuid" "$crash" "$crash.strip.$uuid"
echo '{"op":"start","test":"gnu_debuglink_test"}';
start=$(date +%s)
if "$crash.strip" 2>&1 | grep 'Crash.cpp:[0-9]*$' > /dev/null; then
if "$crash.strip.$uuid" 2>&1 | grep -q 'Crash.cpp:[0-9]*$'; then
result='"status":"passed"';
else
result='"status":"failed"';
......
Markdown is supported
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