Skip to content

Commit de68ebf

Browse files
committed
fixup! test: enable trace_events tests with perfetto
Signed-off-by: Chengzhong Wu <cwu631@bloomberg.net>
1 parent a969925 commit de68ebf

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

‎tools/perfetto/get_trace_processor‎

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44
# perfetto builds write through this tool.
55
set -e
66

7-
tools_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
8-
version=$(cat "$tools_dir/../../deps/perfetto/VERSION")
9-
trace_processor="$1"
7+
script_dir=$(CDPATH= cd -- "$(dirname -- "$0")" && pwd)
8+
version=$(cat "$script_dir/../../deps/perfetto/VERSION")
9+
trace_processor="${1:-$script_dir/trace_processor_shell}"
1010

1111
# Perfetto names its release archives <os>-<arch>, which does not match uname.
1212
case "$(uname -s)" in
@@ -22,12 +22,12 @@ case "$(uname -m)" in
2222
esac
2323

2424
url="https://github.com/google/perfetto/releases/download/v$version/$os-$arch.zip"
25-
archive="$tools_dir/$os-$arch.zip"
25+
archive=$(mktemp)
2626

2727
rm -f "$trace_processor"
2828
echo "Downloading $url"
2929
curl -sSfL -o "$archive" "$url"
30-
unzip -q -j -o "$archive" '*/trace_processor_shell' -d "$tools_dir"
30+
unzip -q -j -o "$archive" '*/trace_processor_shell' -d "$script_dir"
3131
rm -f "$archive"
3232
chmod +x "$trace_processor"
3333
# The archive carries the release's own mtime. Make decides whether the tool is

0 commit comments

Comments
 (0)