summaryrefslogtreecommitdiffstats
path: root/kernel/tools/perf/tests/perf-targz-src-pkg
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/tools/perf/tests/perf-targz-src-pkg')
-rwxr-xr-xkernel/tools/perf/tests/perf-targz-src-pkg21
1 files changed, 21 insertions, 0 deletions
diff --git a/kernel/tools/perf/tests/perf-targz-src-pkg b/kernel/tools/perf/tests/perf-targz-src-pkg
new file mode 100755
index 000000000..238aa3927
--- /dev/null
+++ b/kernel/tools/perf/tests/perf-targz-src-pkg
@@ -0,0 +1,21 @@
+#!/bin/sh
+# 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.
+
+PERF=$1
+cd ${PERF}/../..
+make perf-targz-src-pkg > /dev/null
+TARBALL=$(ls -rt perf-*.tar.gz)
+TMP_DEST=$(mktemp -d)
+tar xf ${TARBALL} -C $TMP_DEST
+rm -f ${TARBALL}
+cd - > /dev/null
+make -C $TMP_DEST/perf*/tools/perf > /dev/null 2>&1
+RC=$?
+rm -rf ${TMP_DEST}
+exit $RC