18c2ecf20Sopenharmony_ci#!/bin/sh 28c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 38c2ecf20Sopenharmony_ci# Test one of the main kernel Makefile targets to generate a perf sources tarball 48c2ecf20Sopenharmony_ci# suitable for build outside the full kernel sources. 58c2ecf20Sopenharmony_ci# 68c2ecf20Sopenharmony_ci# This is to test that the tools/perf/MANIFEST file lists all the files needed to 78c2ecf20Sopenharmony_ci# be in such tarball, which sometimes gets broken when we move files around, 88c2ecf20Sopenharmony_ci# like when we made some files that were in tools/perf/ available to other tools/ 98c2ecf20Sopenharmony_ci# codebases by moving it to tools/include/, etc. 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ciPERF=$1 128c2ecf20Sopenharmony_cicd ${PERF}/../.. 138c2ecf20Sopenharmony_cimake perf-targz-src-pkg > /dev/null 148c2ecf20Sopenharmony_ciTARBALL=$(ls -rt perf-*.tar.gz) 158c2ecf20Sopenharmony_ciTMP_DEST=$(mktemp -d) 168c2ecf20Sopenharmony_citar xf ${TARBALL} -C $TMP_DEST 178c2ecf20Sopenharmony_cirm -f ${TARBALL} 188c2ecf20Sopenharmony_cicd - > /dev/null 198c2ecf20Sopenharmony_cimake -C $TMP_DEST/perf*/tools/perf > /dev/null 208c2ecf20Sopenharmony_ciRC=$? 218c2ecf20Sopenharmony_cirm -rf ${TMP_DEST} 228c2ecf20Sopenharmony_ciexit $RC 23