Title: [155305] trunk/Tools
Revision
155305
Author
[email protected]
Date
2013-09-08 10:31:34 -0700 (Sun, 08 Sep 2013)

Log Message

run-jsc-stress-tests should be smart enough to call JSRegress "regress/script-tests" rather than "script-tests"
https://bugs.webkit.org/show_bug.cgi?id=120994

Reviewed by Geoffrey Garen.
        
run-jsc-stress-tests accepts a list of directories containing tests.  It needs to
come up with names for all of them.  Currently it uses the basename of the test
directory.  But that means that JSRegress gets called "script-tests", which is
unfortunate since any directory in LayoutTests containing .js files will be
called "script-tests".  So, this changes run-jsc-stress-tests to use more than
just the basename if the basename has the word "tests" in it.  This causes
JSRegress to be called "regress/script-tests".

* Scripts/run-jsc-stress-tests:

Modified Paths

Diff

Modified: trunk/Tools/ChangeLog (155304 => 155305)


--- trunk/Tools/ChangeLog	2013-09-08 12:00:17 UTC (rev 155304)
+++ trunk/Tools/ChangeLog	2013-09-08 17:31:34 UTC (rev 155305)
@@ -1,3 +1,20 @@
+2013-09-08  Filip Pizlo  <[email protected]>
+
+        run-jsc-stress-tests should be smart enough to call JSRegress "regress/script-tests" rather than "script-tests"
+        https://bugs.webkit.org/show_bug.cgi?id=120994
+
+        Reviewed by Geoffrey Garen.
+        
+        run-jsc-stress-tests accepts a list of directories containing tests.  It needs to
+        come up with names for all of them.  Currently it uses the basename of the test
+        directory.  But that means that JSRegress gets called "script-tests", which is
+        unfortunate since any directory in LayoutTests containing .js files will be
+        called "script-tests".  So, this changes run-jsc-stress-tests to use more than
+        just the basename if the basename has the word "tests" in it.  This causes
+        JSRegress to be called "regress/script-tests".
+
+        * Scripts/run-jsc-stress-tests:
+
 2013-09-08  Sergio Correia  <[email protected]>
 
         [EFL][JHBUILD] Fix evas build with giflib5

Modified: trunk/Tools/Scripts/run-jsc-stress-tests (155304 => 155305)


--- trunk/Tools/Scripts/run-jsc-stress-tests	2013-09-08 12:00:17 UTC (rev 155304)
+++ trunk/Tools/Scripts/run-jsc-stress-tests	2013-09-08 17:31:34 UTC (rev 155305)
@@ -137,7 +137,7 @@
 end
 
 def skip
-    puts "Skipping #{$benchmark}"
+    puts "Skipping #{$collectionName}/#{$benchmark}"
 end
 
 collectionNames = {}
@@ -152,17 +152,29 @@
 
 ARGV.each {
     | collection |
-    $collection = collection
-    $collectionName = File.basename(collection)
+    $collection = Pathname.new(collection)
+    outerDir = $collection.dirname
+    name = $collection.basename
+    lastName = name
+    while lastName.to_s =~ /test/
+        lastName = outerDir.basename
+        name = lastName + name
+        outerDir = outerDir.dirname
+    end
+    $collectionName = name.to_s
     toAdd = 1
     while collectionNames[$collectionName]
-        $collectionName = File.basename(collection) + "-#{toAdd}"
+        $collectionName = File.basename(name.to_s) + "-#{toAdd}"
         toAdd += 1
     end
     collectionNames[$collectionName] = true
-    dir = $outputDir + $collectionName
-    Dir.mkdir(dir) unless dir.directory?
-    Dir.chdir(collection) {
+    dir = $outputDir
+    name.each_filename {
+        | filename |
+        dir = dir + filename
+        Dir.mkdir(dir) unless dir.directory?
+    }
+    Dir.chdir($collection) {
         Dir.foreach('.') {
             | benchmark |
             next unless benchmark =~ /\.js$/
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to