github.com/FISCO-BCOS/crypto@v0.0.0-20200202032121-bd8ab0b5d4f1/internal/trace/mkcanned.bash (about)

     1  #!/usr/bin/env bash
     2  # Copyright 2016 The Go Authors. All rights reserved.
     3  # Use of this source code is governed by a BSD-style
     4  # license that can be found in the LICENSE file.
     5  
     6  # mkcanned.bash creates canned traces for the trace test suite using
     7  # the current Go version.
     8  
     9  set -e
    10  
    11  if [ $# != 1 ]; then
    12      echo "usage: $0 <label>" >&2
    13      exit 1
    14  fi
    15  
    16  go test -run ClientServerParallel4 -trace "testdata/http_$1_good" net/http
    17  go test -run 'TraceStress$|TraceStressStartStop$|TestUserTaskSpan$' runtime/trace -savetraces
    18  mv ../../runtime/trace/TestTraceStress.trace "testdata/stress_$1_good"
    19  mv ../../runtime/trace/TestTraceStressStartStop.trace "testdata/stress_start_stop_$1_good"
    20  mv ../../runtime/trace/TestUserTaskSpan.trace "testdata/user_task_span_$1_good"