2010-04-27 Adam Barth <abarth@webkit.org>
authorabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Apr 2010 20:25:07 +0000 (20:25 +0000)
committerabarth@webkit.org <abarth@webkit.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 27 Apr 2010 20:25:07 +0000 (20:25 +0000)
        Reviewed by Darin Adler.

        run-bindings-tests should use --reset-results instead of --overwrite
        https://bugs.webkit.org/show_bug.cgi?id=38200

        As requested by Ojan.

        * Scripts/run-bindings-tests:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@58329 268f45cc-cd09-0410-ab3c-d52691b4dbfc

WebKitTools/ChangeLog
WebKitTools/Scripts/run-bindings-tests

index e6362c2..aa02dc5 100644 (file)
@@ -1,5 +1,16 @@
 2010-04-27  Adam Barth  <abarth@webkit.org>
 
+        Reviewed by Darin Adler.
+
+        run-bindings-tests should use --reset-results instead of --overwrite
+        https://bugs.webkit.org/show_bug.cgi?id=38200
+
+        As requested by Ojan.
+
+        * Scripts/run-bindings-tests:
+
+2010-04-27  Adam Barth  <abarth@webkit.org>
+
         Reviewed by Eric Seidel.
 
         REGRESSION(r58261): webkit-patch edit-changelogs is broken
index ae174cf..56b2aff 100755 (executable)
@@ -67,7 +67,7 @@ def detect_changes(work_directory, reference_directory):
     return changes_found
 
 
-def run_tests(generator, input_directory, reference_directory, overwrite):
+def run_tests(generator, input_directory, reference_directory, reset_results):
     work_directory = reference_directory
 
     passed = True
@@ -77,14 +77,14 @@ def run_tests(generator, input_directory, reference_directory, overwrite):
             continue
         print 'Testing the %s generator on %s' % (generator, input_file)
         # Generate output into the work directory (either the given one or a 
-        # temp one if not overwrite is performed)
-        if not overwrite:
+        # temp one if not reset_results is performed)
+        if not reset_results:
             work_directory = tempfile.mkdtemp()
         if not generate_from_idl(generator, os.path.join(input_directory,
                                                          input_file),
                                  work_directory):
             passed = False
-        if overwrite:
+        if reset_results:
             print "Overwrote reference files"
             continue
         # Detect changes
@@ -101,10 +101,10 @@ def main(argv):
     the results with reference files.
 
     Options:
-        --overwrite: Overwrites the reference files with the generated results.
+       --reset-results: Overwrites the reference files with the generated results.
 
     """
-    overwrite = "--overwrite" in argv
+    reset_results = "--reset-results" in argv
 
     current_scm = scm.detect_scm_system(os.curdir)
     os.chdir(current_scm.checkout_root)
@@ -121,14 +121,14 @@ def main(argv):
     for generator in generators:
         input_directory = os.path.join('WebCore', 'bindings', 'scripts', 'test')
         reference_directory = os.path.join('WebCore', 'bindings', 'scripts', 'test', generator)
-        if not run_tests(generator, input_directory, reference_directory, overwrite):
+        if not run_tests(generator, input_directory, reference_directory, reset_results):
             all_tests_passed = False
 
     if all_tests_passed:
         print 'All tests passed!'
         return 0
     else:
-        print '(To update the reference files, execute "run-bindings-test --overwrite")'
+        print '(To update the reference files, execute "run-bindings-test --reset-results")'
         return -1