2023-08-30 17:31:07 +02:00
|
|
|
#!/bin/sh
|
|
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
|
|
# Test one of the main kernel Makefile targets to generate a perf sources tarball
|
|
|
|
# suitable for build outside the full kernel sources.
|
|
|
|
#
|
|
|
|
# This is to test that the tools/perf/MANIFEST file lists all the files needed to
|
|
|
|
# be in such tarball, which sometimes gets broken when we move files around,
|
|
|
|
# like when we made some files that were in tools/perf/ available to other tools/
|
|
|
|
# codebases by moving it to tools/include/, etc.
|
2023-10-24 12:59:35 +02:00
|
|
|
set -e
|
2023-08-30 17:31:07 +02:00
|
|
|
|
|
|
|
PERF=$1
|
|
|
|
cd ${PERF}/../..
|
2023-10-24 12:59:35 +02:00
|
|
|
make perf-targz-src-pkg
|
2023-08-30 17:31:07 +02:00
|
|
|
TARBALL=$(ls -rt perf-*.tar.gz)
|
|
|
|
TMP_DEST=$(mktemp -d)
|
|
|
|
tar xf ${TARBALL} -C $TMP_DEST
|
|
|
|
rm -f ${TARBALL}
|
|
|
|
cd - > /dev/null
|
2023-10-24 12:59:35 +02:00
|
|
|
make -C $TMP_DEST/perf*/tools/perf
|
2023-08-30 17:31:07 +02:00
|
|
|
RC=$?
|
|
|
|
rm -rf ${TMP_DEST}
|
|
|
|
exit $RC
|