Merge branch 'master' of github.com:HariSekhon/bash-tools

pull/2/head
Hari Sekhon 6 years ago
commit 3a26ce8f1d

@ -142,7 +142,7 @@ docker_compose_version_test(){
found_version="$(docker_compose_path_version / "$name"-)"
echo "found $name version $found_version"
hr
if [[ "$found_version" =~ $version* ]]; then
if [[ "$found_version" =~ $version ]]; then
echo "$name docker version matches expected (found '$found_version', expected '$version')"
else
echo "Docker container version does not match expected version! (found '$found_version', expected '$version')"

@ -33,11 +33,18 @@ if [ -n "${NOCOMPILE:-}" ]; then
elif [ -n "${QUICK:-}" ]; then
echo '$QUICK environment variable set, skipping python compile'
else
for x in $(find "${1:-.}" -maxdepth 2 -type f -iname '*.py' -o -iname '*.jy' | sort); do
type isExcluded &>/dev/null && isExcluded "$x" && continue
echo "compiling $x"
python -m py_compile "$x"
done
if [ -n "${FAST:-}" ]; then
python -m compileall "${1:-.}" || :
else
for x in $(find "${1:-.}" -maxdepth 2 -type f -iname '*.py' -o -iname '*.jy' | sort); do
type isExcluded &>/dev/null && isExcluded "$x" && continue
echo "compiling $x"
# -O - optimize
# -3 - warn on Python 3 incompatibilies that 2to3 cannot easily fix
# -t - warn on inconsistent use of tabs
python -O -3 -t -m py_compile "$x"
done
fi
fi
time_taken "$start_time"

@ -353,8 +353,12 @@ run_test_versions(){
local test_func="$(tr 'A-Z' 'a-z' <<< "test_${name/ /_}")"
local VERSIONS="$(tr 'a-z' 'A-Z' <<< "${name/ /_}_VERSIONS")"
local test_versions="$(eval ci_sample $`echo $VERSIONS`)"
local test_versions_ordered="$test_versions"
if [ -z "${NO_VERSION_REVERSE:-}" ]; then
local test_versions_ordered="$(tr ' ' '\n' <<< "$test_versions" | tail -r | tr '\n' ' ')"
fi
local start_time="$(start_timer "$name tests")"
for version in $test_versions; do
for version in $test_versions_ordered; do
version_start_time="$(start_timer "$name test for version: $version")"
run_count=0
eval "$test_func" "$version"

Loading…
Cancel
Save