148878053SArnaldo Carvalho de Melo#!/bin/sh 248878053SArnaldo Carvalho de Melo# Test one of the main kernel Makefile targets to generate a perf sources tarball 348878053SArnaldo Carvalho de Melo# suitable for build outside the full kernel sources. 448878053SArnaldo Carvalho de Melo# 548878053SArnaldo Carvalho de Melo# This is to test that the tools/perf/MANIFEST file lists all the files needed to 648878053SArnaldo Carvalho de Melo# be in such tarball, which sometimes gets broken when we move files around, 748878053SArnaldo Carvalho de Melo# like when we made some files that were in tools/perf/ available to other tools/ 848878053SArnaldo Carvalho de Melo# codebases by moving it to tools/include/, etc. 948878053SArnaldo Carvalho de Melo 1048878053SArnaldo Carvalho de MeloPERF=$1 1148878053SArnaldo Carvalho de Melocd ${PERF}/../.. 1248878053SArnaldo Carvalho de Melomake perf-targz-src-pkg > /dev/null 1348878053SArnaldo Carvalho de MeloTARBALL=$(ls -rt perf-*.tar.gz) 1448878053SArnaldo Carvalho de MeloTMP_DEST=$(mktemp -d) 1548878053SArnaldo Carvalho de Melotar xf ${TARBALL} -C $TMP_DEST 1648878053SArnaldo Carvalho de Melorm -f ${TARBALL} 1748878053SArnaldo Carvalho de Melocd - > /dev/null 1848878053SArnaldo Carvalho de Melomake -C $TMP_DEST/perf*/tools/perf > /dev/null 2>&1 1948878053SArnaldo Carvalho de MeloRC=$? 2048878053SArnaldo Carvalho de Melorm -rf ${TMP_DEST} 2148878053SArnaldo Carvalho de Meloexit $RC 22