Mercurial > hg > graal-compiler
comparison mxtool/mx.py @ 8958:64d3d352f943
Do not skip a checkstyle test on the next run if it does not succeed in the current run
author | Gilles Duboscq <duboscq@ssw.jku.at> |
---|---|
date | Tue, 09 Apr 2013 19:24:39 +0200 |
parents | 51a8368d0231 |
children | 096725f4da58 |
comparison
equal
deleted
inserted
replaced
8957:1af9b5d75139 | 8958:64d3d352f943 |
---|---|
1811 | 1811 |
1812 if not mustCheck: | 1812 if not mustCheck: |
1813 log('[all Java sources in {0} already checked - skipping]'.format(sourceDir)) | 1813 log('[all Java sources in {0} already checked - skipping]'.format(sourceDir)) |
1814 continue | 1814 continue |
1815 | 1815 |
1816 if exists(timestampFile): | |
1817 os.utime(timestampFile, None) | |
1818 else: | |
1819 file(timestampFile, 'a') | |
1820 | |
1821 dotCheckstyleXML = xml.dom.minidom.parse(dotCheckstyle) | 1816 dotCheckstyleXML = xml.dom.minidom.parse(dotCheckstyle) |
1822 localCheckConfig = dotCheckstyleXML.getElementsByTagName('local-check-config')[0] | 1817 localCheckConfig = dotCheckstyleXML.getElementsByTagName('local-check-config')[0] |
1823 configLocation = localCheckConfig.getAttribute('location') | 1818 configLocation = localCheckConfig.getAttribute('location') |
1824 configType = localCheckConfig.getAttribute('type') | 1819 configType = localCheckConfig.getAttribute('type') |
1825 if configType == 'project': | 1820 if configType == 'project': |
1881 with open(auditfileName) as f: | 1876 with open(auditfileName) as f: |
1882 warnings = [line.strip() for line in f if 'warning:' in line] | 1877 warnings = [line.strip() for line in f if 'warning:' in line] |
1883 if len(warnings) != 0: | 1878 if len(warnings) != 0: |
1884 map(log, warnings) | 1879 map(log, warnings) |
1885 return 1 | 1880 return 1 |
1881 else: | |
1882 if exists(timestampFile): | |
1883 os.utime(timestampFile, None) | |
1884 else: | |
1885 file(timestampFile, 'a') | |
1886 finally: | 1886 finally: |
1887 if exists(auditfileName): | 1887 if exists(auditfileName): |
1888 os.unlink(auditfileName) | 1888 os.unlink(auditfileName) |
1889 return 0 | 1889 return 0 |
1890 | 1890 |