changeset 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 1af9b5d75139
children 7fee8bd5d2bd
files mxtool/mx.py
diffstat 1 files changed, 5 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/mxtool/mx.py	Tue Apr 09 16:28:19 2013 +0200
+++ b/mxtool/mx.py	Tue Apr 09 19:24:39 2013 +0200
@@ -1813,11 +1813,6 @@
                 log('[all Java sources in {0} already checked - skipping]'.format(sourceDir))
                 continue
 
-            if exists(timestampFile):
-                os.utime(timestampFile, None)
-            else:
-                file(timestampFile, 'a')
-
             dotCheckstyleXML = xml.dom.minidom.parse(dotCheckstyle)
             localCheckConfig = dotCheckstyleXML.getElementsByTagName('local-check-config')[0]
             configLocation = localCheckConfig.getAttribute('location')
@@ -1883,6 +1878,11 @@
                                 if len(warnings) != 0:
                                     map(log, warnings)
                                     return 1
+                                else:
+                                    if exists(timestampFile):
+                                        os.utime(timestampFile, None)
+                                    else:
+                                        file(timestampFile, 'a')
             finally:
                 if exists(auditfileName):
                     os.unlink(auditfileName)