aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xscripts/make_pip.sh12
1 files changed, 11 insertions, 1 deletions
diff --git a/scripts/make_pip.sh b/scripts/make_pip.sh
index 4602dcf..25a4049 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}