From f12465ce91ea487b64afbdcd26147c723301b792 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Nov 2023 08:36:02 -0700 Subject: 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 --- scripts/make_pip.sh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index 4602dcf61c8..25a4049271c 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -29,6 +29,9 @@ repo="--repository testpypi" # Non-empty to do the actual upload upload=1 +# Non-empty to delete files used for testing +delete_testfiles=1 + tool="$1" shift flags="$*" @@ -58,6 +61,11 @@ if [ -n "${upload}" ]; then 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 dir=$(mktemp -d) @@ -91,7 +99,9 @@ find ${dest} -name __pycache__ -type f -exec rm {} \; find ${dest} -depth -name __pycache__ -exec rmdir 112 \; # Remove test files -rm -rf ${dest}/*test* +if [ -n "${delete_testfiles}" ]; then + rm -rfv ${dest}/*test* +fi mkdir ${dir}/tests cd ${dir} -- cgit v1.2.3 From 01feeec559858b6935f57b3d0fb26ac329118917 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sun, 19 Nov 2023 08:36:04 -0700 Subject: tools/make_pip: Add mention of u_boot_pylib in tool list This is not a tool but it is handled by the script, so update the help to include it. Signed-off-by: Simon Glass --- scripts/make_pip.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh index 25a4049271c..d2639ffd6e4 100755 --- a/scripts/make_pip.sh +++ b/scripts/make_pip.sh @@ -39,7 +39,7 @@ flags="$*" if [[ "${tool}" =~ ^(patman|buildman|dtoc|binman|u_boot_pylib)$ ]]; then echo "Building dist package for tool ${tool}" else - echo "Unknown tool ${tool}: use patman, buildman, dtoc or binman" + echo "Unknown tool ${tool}: use u_boot_pylib, patman, buildman, dtoc or binman" exit 1 fi -- cgit v1.2.3