Adds writer test case for RCU
[folly.git] / folly / experimental / symbolizer / test / gnu_debuglink_test.sh
1 #!/bin/bash
2
3 crash="$1"
4 rm -f "$crash."{debuginfo,strip}
5 objcopy --only-keep-debug "$crash" "$crash.debuginfo"
6 objcopy --strip-debug --add-gnu-debuglink="$crash.debuginfo" "$crash" "$crash.strip"
7
8 echo '{"op":"start","test":"gnu_debuglink_test"}';
9 start=$(date +%s)
10 if "$crash.strip" 2>&1 | grep 'Crash.cpp:[0-9]*$' > /dev/null; then
11     result='"status":"passed"';
12 else
13     result='"status":"failed"';
14 fi
15 end=$(date +%s)
16 echo '{"op":"test_done","test":"gnu_debuglink_test",'"$result"'}'
17 echo '{"op":"all_done","results":[{"name":"gnu_debuglink_test",'"$result"',"start_time":'"$start"',"end_time":'"$end"',"details":"nothing"}]}'