brintos

brintos / linux-shallow public Read only

0
0
Text · 717 B · 4caa496 Raw
33 lines · bash
1#!/bin/bash2 3# SPDX-License-Identifier: GPL-2.04 5#6#	setup.sh of perf report test7#	Author: Michael Petlan <mpetlan@redhat.com>8#9#	Description:10#11#		We need some sample data for perf-report testing12#13#14 15# include working environment16. ../common/init.sh17 18test -d "$HEADER_TAR_DIR" || mkdir -p "$HEADER_TAR_DIR"19 20SW_EVENT="cpu-clock"21 22$CMD_PERF record -asdg -e $SW_EVENT -o $CURRENT_TEST_DIR/perf.data -- $CMD_LONGER_SLEEP 2> $LOGS_DIR/setup.log23PERF_EXIT_CODE=$?24 25../common/check_all_patterns_found.pl "$RE_LINE_RECORD1" "$RE_LINE_RECORD2" < $LOGS_DIR/setup.log26CHECK_EXIT_CODE=$?27 28print_results $PERF_EXIT_CODE $CHECK_EXIT_CODE "prepare the perf.data file"29TEST_RESULT=$?30 31print_overall_results $TEST_RESULT32exit $?33