From e14b02197737a0d7e5eed2856806cf20c85052cf Mon Sep 17 00:00:00 2001 From: Austin Clements Date: Fri, 28 Oct 2016 10:53:41 -0400 Subject: [PATCH] runtime/trace, internal/trace: script to collect canned traces This adds support to the runtime/trace test for saving traces collected by its tests to disk and a script in internal/trace that uses this to collect canned traces for the trace test suite. This can be used to add to the test suite when we introduce a new trace format version. Change-Id: Id9ac1ff312235bf02f982fdfff8a827f54035758 Reviewed-on: https://go-review.googlesource.com/32290 Run-TryBot: Austin Clements TryBot-Result: Gobot Gobot Reviewed-by: Dmitry Vyukov --- src/internal/trace/mkcanned.bash | 19 +++++++++++++++++++ src/internal/trace/parser.go | 2 ++ src/runtime/trace/trace_test.go | 20 ++++++++++++++++++++ 3 files changed, 41 insertions(+) create mode 100755 src/internal/trace/mkcanned.bash diff --git a/src/internal/trace/mkcanned.bash b/src/internal/trace/mkcanned.bash new file mode 100755 index 0000000000..78c5572065 --- /dev/null +++ b/src/internal/trace/mkcanned.bash @@ -0,0 +1,19 @@ +#!/usr/bin/env bash +# Copyright 2016 The Go Authors. All rights reserved. +# Use of this source code is governed by a BSD-style +# license that can be found in the LICENSE file. + +# mkcanned.bash creates canned traces for the trace test suite using +# the current Go version. + +set -e + +if [ $# != 1 ]; then + echo "usage: $0