blob: fae26b1cf08f50a8c0caacf7bc0715e948ef0c03 [file] [log] [blame]
Arnaldo Carvalho de Melo48878052014-01-10 16:46:45 -03001#!/bin/sh
Greg Kroah-Hartmanb2441312017-11-01 15:07:57 +01002# SPDX-License-Identifier: GPL-2.0
Arnaldo Carvalho de Melo48878052014-01-10 16:46:45 -03003# Test one of the main kernel Makefile targets to generate a perf sources tarball
4# suitable for build outside the full kernel sources.
5#
6# This is to test that the tools/perf/MANIFEST file lists all the files needed to
7# be in such tarball, which sometimes gets broken when we move files around,
8# like when we made some files that were in tools/perf/ available to other tools/
9# codebases by moving it to tools/include/, etc.
10
11PERF=$1
12cd ${PERF}/../..
13make perf-targz-src-pkg > /dev/null
14TARBALL=$(ls -rt perf-*.tar.gz)
15TMP_DEST=$(mktemp -d)
16tar xf ${TARBALL} -C $TMP_DEST
17rm -f ${TARBALL}
18cd - > /dev/null
Arnaldo Carvalho de Melocde88352016-03-24 11:22:43 -030019make -C $TMP_DEST/perf*/tools/perf > /dev/null
Arnaldo Carvalho de Melo48878052014-01-10 16:46:45 -030020RC=$?
21rm -rf ${TMP_DEST}
22exit $RC