Changeset 181143 in webkit
- Timestamp:
- Mar 6, 2015 1:18:58 AM (9 years ago)
- Location:
- trunk/Tools
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Tools/ChangeLog
r181131 r181143 1 2015-03-06 Csaba Osztrogonác <ossy@webkit.org> 2 3 run-jsc-stress-tests should determine the architecture from ELF binaries 4 https://bugs.webkit.org/show_bug.cgi?id=142335 5 6 Reviewed by Darin Adler. 7 8 * Scripts/run-jsc-stress-tests: 9 1 10 2015-03-05 David Kilzer <ddkilzer@apple.com> 2 11 -
trunk/Tools/Scripts/run-jsc-stress-tests
r180639 r181143 251 251 end 252 252 253 def determineArchitecture 253 def determineArchitectureFromMachOBinary 254 254 code = machOArchitectureCode 255 255 return nil unless code … … 270 270 end 271 271 272 def determineArchitectureFromELFBinary 273 f = File.open($jscPath.to_s) 274 data = f.read(19) 275 276 if !(data[0,4] == "\x7F\x45\x4C\x46") 277 $stderr.puts "Warning: Missing ELF magic in file #{Shellwords.shellescape($jscPath.to_s)}" 278 return nil 279 end 280 281 code = data[18].ord 282 case code 283 when 3 284 "x86" 285 when 62 286 "x86-64" 287 when 40 288 "arm" 289 when 183 290 "arm64" 291 else 292 $stderr.puts "Warning: unable to determine architecture from code: #{code}" 293 nil 294 end 295 end 296 297 def determineArchitecture 298 case $hostOS 299 when "darwin" 300 determineArchitectureFromMachOBinary 301 when "linux" 302 determineArchitectureFromELFBinary 303 else 304 $stderr.puts "Warning: unable to determine architecture on this platform." 305 nil 306 end 307 end 308 272 309 def determineOS 273 310 case RbConfig::CONFIG["host_os"] … … 284 321 end 285 322 323 $hostOS = determineOS unless $hostOS 286 324 $architecture = determineArchitecture unless $architecture 287 $hostOS = determineOS unless $hostOS288 325 289 326 if !$testRunnerType
Note: See TracChangeset
for help on using the changeset viewer.