Title: [271427] trunk/Tools
- Revision
- 271427
- Author
- [email protected]
- Date
- 2021-01-12 20:17:31 -0800 (Tue, 12 Jan 2021)
Log Message
Implement serial tests for the ruby test writer
https://bugs.webkit.org/show_bug.cgi?id=220360
Patch by Angelos Oikonomopoulos <[email protected]> on 2021-01-12
Reviewed by Yusuke Suzuki.
This is a verbatim copy of the implementation in the default writer.
* Scripts/webkitruby/jsc-stress-test-writer-ruby.rb:
Modified Paths
Diff
Modified: trunk/Tools/ChangeLog (271426 => 271427)
--- trunk/Tools/ChangeLog 2021-01-13 04:14:28 UTC (rev 271426)
+++ trunk/Tools/ChangeLog 2021-01-13 04:17:31 UTC (rev 271427)
@@ -1,3 +1,14 @@
+2021-01-12 Angelos Oikonomopoulos <[email protected]>
+
+ Implement serial tests for the ruby test writer
+ https://bugs.webkit.org/show_bug.cgi?id=220360
+
+ Reviewed by Yusuke Suzuki.
+
+ This is a verbatim copy of the implementation in the default writer.
+
+ * Scripts/webkitruby/jsc-stress-test-writer-ruby.rb:
+
2021-01-12 Tetsuharu Ohzeki <[email protected]>
Invoke ccache properly on macOS aarch64
Modified: trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-ruby.rb (271426 => 271427)
--- trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-ruby.rb 2021-01-13 04:14:28 UTC (rev 271426)
+++ trunk/Tools/Scripts/webkitruby/jsc-stress-test-writer-ruby.rb 2021-01-13 04:17:31 UTC (rev 271427)
@@ -410,24 +410,48 @@
`dos2unix #{$runnerDir + "runscript"}`
end
+def output_target(outp, plan, prereqs)
+ index = plan.index
+ target = "test_done_#{index}"
+ outp.puts "#{target}: #{prereqs.join(" ")}"
+ outp.puts "\truby test_script_#{index}"
+ target
+end
+
def prepareMakeTestRunner(remoteIndex)
- runIndices = []
+ serialPlans = {}
+ $serialRunlist.each { |p| serialPlans[p] = nil }
+ runPlans = []
+ serialRunPlans = []
$runlist.each {
| plan |
if !$remote or plan.index % $remoteHosts.length == remoteIndex
- runIndices << plan.index
+ if serialPlans.has_key?(plan)
+ serialRunPlans << plan
+ else
+ runPlans << plan
+ end
end
}
-
+
File.open($runnerDir + "Makefile.#{remoteIndex}", "w") {
| outp |
- outp.puts("all: " + runIndices.map{|v| "test_done_#{v}"}.join(' '))
- runIndices.each {
- | index |
- plan = $runlist[index]
- outp.puts "test_done_#{index}:"
- outp.puts "\truby test_script_#{plan.index}"
+ if serialRunPlans.empty?
+ outp.puts("all: parallel")
+ else
+ serialPrereq = "test_done_#{serialRunPlans[-1].index}"
+ outp.puts("all: #{serialPrereq}")
+ prev_target = "parallel"
+ serialRunPlans.each {
+ | plan |
+ prev_target = output_target(outp, plan, [prev_target])
+ }
+ end
+ parallelTargets = runPlans.collect {
+ | plan |
+ output_target(outp, plan, [])
}
+ outp.puts("parallel: " + parallelTargets.join(" "))
}
end
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes