File tree Expand file tree Collapse file tree 3 files changed +15
-7
lines changed
Expand file tree Collapse file tree 3 files changed +15
-7
lines changed Original file line number Diff line number Diff line change 2323 fi
2424fi
2525
26- # version=${1:-2.6.1}
27- filename=$( cd ../src/dist; ls -t pyarmor-* .${PKGEXT} ) || exit 1
26+ # From pyarmor 3.5.1, dist is moved to top level
27+ DIST=" ../dist"
28+ [[ -d " ../dist" ]] || DIST=" ../src/dist"
29+ filename=$( cd ${DIST} ; ls -t pyarmor-* .${PKGEXT} ) || exit 1
2830version=${filename: 8: 5}
2931extchar=${PYARMOR_EXTRA_CHAR:- e}
3032workpath=__runtest__
3133datafile=$( pwd) /data/pyarmor-data.tar.gz
32- pkgfile=$( pwd) /../src/dist /pyarmor-${version} .${PKGEXT}
34+ pkgfile=$( pwd) /${DIST} /pyarmor-${version} .${PKGEXT}
3335
3436declare -i _bug_counter=0
3537
@@ -325,6 +327,8 @@ cd ${workpath}
325327[[ ${pkgfile} == * .zip ]] && unzip ${pkgfile} > /dev/null 2>&1
326328[[ ${pkgfile} == * .tar.bz2 ]] && tar xjf ${pkgfile}
327329cd pyarmor-$version || csih_error " Invalid pyarmor package file"
330+ # From pyarmor 3.5.1, main scripts are moved to src
331+ [[ -d src ]] && mv src/* ./
328332tar xzf ${datafile} || csih_error " Extract data files FAILED"
329333cp -a ../../data/package ./ || csih_error " Copy package files FAILED"
330334
Original file line number Diff line number Diff line change @@ -20,6 +20,8 @@ cd ${workpath}
2020[[ ${pkgfile} == * .zip ]] && unzip ${pkgfile} > /dev/null 2>&1
2121[[ ${pkgfile} == * .tar.bz2 ]] && tar xjf ${pkgfile}
2222cd pyarmor-$version || csih_error " Invalid pyarmor package file"
23+ # From pyarmor 3.5.1, main scripts are moved to src
24+ [[ -d src ]] && mv src/* ./
2325
2426csih_inform " Prepare for system testing"
2527echo " "
@@ -57,7 +59,7 @@ echo "-------------------- Test Command obfuscate --------------------"
5759echo " "
5860
5961csih_inform " Case 1.1: obfuscate script"
60- $PYARMOR obfuscate --src examples --entry queens.py --output dist \
62+ $PYARMOR obfuscate --src examples/simple --entry queens.py --output dist \
6163 " *.py" > result.log 2>&1
6264
6365check_file_exists dist/queens.py
Original file line number Diff line number Diff line change 2929 fi
3030fi
3131
32- # version=${1:-2.6.1}
33- filename=$( cd ../src/dist; ls -t pyarmor-* .${PKGEXT} ) || exit 1
32+ # From pyarmor 3.5.1, dist is moved to top level
33+ DIST=" ../dist"
34+ [[ -d " ../dist" ]] || DIST=" ../src/dist"
35+ filename=$( cd ${DIST} ; ls -t pyarmor-* .${PKGEXT} ) || exit 1
3436version=${filename: 8: 5}
3537workpath=__runtest2__
36- pkgfile=$( pwd) /../src/dist /pyarmor-${version} .${PKGEXT}
38+ pkgfile=$( pwd) /${DIST} /pyarmor-${version} .${PKGEXT}
3739
3840declare -i _bug_counter=0
3941
You can’t perform that action at this time.
0 commit comments