Changeset - bf85e6018daa
[Not reviewed]
default
0 2 0
Thomas De Schampheleire - 6 years ago 2020-03-07 20:48:02
thomas.de_schampheleire@nokia.com
scripts: properly check for errors in whitespacecleanup/run-all-cleanup

An error in whitespacecleanup, like a bug in isort that raises an exception,
should be treated as a problem instead of silently ignored.
2 files changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
scripts/validate-commits
Show inline comments
 
@@ -37,21 +37,25 @@ for rev in $(hg log -r "$1" -T '{node}\n
 
    python3 -m venv "$venv"
 
    source "$venv/bin/activate"
 
    pip install --upgrade pip setuptools
 
    pip install -e . -r dev_requirements.txt python-ldap python-pam
 

	
 
    # run-all-cleanup
 
    scripts/run-all-cleanup
 
    if ! scripts/run-all-cleanup ; then
 
        echo "run-all-cleanup encountered errors!"
 
        result="NOK"
 
    else
 
    if ! hg update --check -q .; then
 
        echo "run-all-cleanup did not give clean results!"
 
        result="NOK"
 
        hg diff
 
        hg revert -a
 
    else
 
        result=" OK"
 
    fi
 
    fi
 
    echo "$result: $rev (run-all-cleanup)" >> "$resultfile"
 

	
 
    # pytest
 
    if py.test; then
 
        result=" OK"
 
    else
scripts/whitespacecleanup.sh
Show inline comments
 
#!/bin/bash -x
 
#!/bin/bash -xe
 

	
 
# Enforce some consistency in whitespace - just to avoid spurious whitespaces changes
 

	
 
files=`hg mani | egrep -v '/fontello/|/email_templates/|(^LICENSE-MERGELY.html|^docs/Makefile|^scripts/whitespacecleanup.sh|/(graph|mergely|native.history)\.js|/test_dump_html_mails.ref.html|\.png|\.gif|\.ico|\.pot|\.po|\.mo|\.tar\.gz|\.diff)$'`
 

	
 
sed -i "s/`printf '\r'`//g" $files
0 comments (0 inline, 0 general)