mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 05:08:24 +00:00
tools: Keep test_util and patman test files in the pip release
The test_util module is actually imported by some tools, e.g. binman so include it in the pip release. The patman tool uses its test code when starting up, so keep that too. Show a list of deleted files so it is clear what is happening. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
parent
ec31f8bac7
commit
f12465ce91
1 changed files with 11 additions and 1 deletions
|
@ -29,6 +29,9 @@ repo="--repository testpypi"
|
||||||
# Non-empty to do the actual upload
|
# Non-empty to do the actual upload
|
||||||
upload=1
|
upload=1
|
||||||
|
|
||||||
|
# Non-empty to delete files used for testing
|
||||||
|
delete_testfiles=1
|
||||||
|
|
||||||
tool="$1"
|
tool="$1"
|
||||||
shift
|
shift
|
||||||
flags="$*"
|
flags="$*"
|
||||||
|
@ -58,6 +61,11 @@ if [ -n "${upload}" ]; then
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "${tool}" =~ ^(patman|u_boot_pylib)$ ]]; then
|
||||||
|
# Leave test_util.py and patman test files alone
|
||||||
|
delete_testfiles=
|
||||||
|
fi
|
||||||
|
|
||||||
# Create a temp dir to work in
|
# Create a temp dir to work in
|
||||||
dir=$(mktemp -d)
|
dir=$(mktemp -d)
|
||||||
|
|
||||||
|
@ -91,7 +99,9 @@ find ${dest} -name __pycache__ -type f -exec rm {} \;
|
||||||
find ${dest} -depth -name __pycache__ -exec rmdir 112 \;
|
find ${dest} -depth -name __pycache__ -exec rmdir 112 \;
|
||||||
|
|
||||||
# Remove test files
|
# Remove test files
|
||||||
rm -rf ${dest}/*test*
|
if [ -n "${delete_testfiles}" ]; then
|
||||||
|
rm -rfv ${dest}/*test*
|
||||||
|
fi
|
||||||
|
|
||||||
mkdir ${dir}/tests
|
mkdir ${dir}/tests
|
||||||
cd ${dir}
|
cd ${dir}
|
||||||
|
|
Loading…
Add table
Reference in a new issue