# HG changeset patch # User iignatyev # Date 1587084074 25200 # Thu Apr 16 17:41:14 2020 -0700 # Node ID a7bd01b7d65d61ab8bbccb41f588192dcb987de3 # Parent 6a8e02e300411e8e2f24e1efd837c14c3014546e 8240904: Screen flashes on test failures when running tests from make Reviewed-by: erikj, serb diff --git a/test/failure_handler/src/share/conf/linux.properties b/test/failure_handler/src/share/conf/linux.properties --- a/test/failure_handler/src/share/conf/linux.properties +++ b/test/failure_handler/src/share/conf/linux.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -111,7 +111,16 @@ net.ifconfig.app=ifconfig net.ifconfig.args=-a -screenshot.app=gnome-screenshot -screenshot.args= -f screen.png +screenshot.app=bash +screenshot.args=-c\0\ + echo '\ + var robot = new java.awt.Robot();\ + var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();\ + var bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\ + var capture = robot.createScreenCapture(bounds);\ + var file = new java.io.File("screen.png");\ + javax.imageio.ImageIO.write(capture, "png", file);\ + ' | jshell - +screenshot.args.delimiter=\0 ################################################################################ diff --git a/test/failure_handler/src/share/conf/mac.properties b/test/failure_handler/src/share/conf/mac.properties --- a/test/failure_handler/src/share/conf/mac.properties +++ b/test/failure_handler/src/share/conf/mac.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -118,5 +118,5 @@ scutil.proxy.args=--proxy screenshot.app=screencapture -screenshot.args= -x screen1.png screen2.png screen3.png screen4.png screen5.png +screenshot.args=-x screen1.png screen2.png screen3.png screen4.png screen5.png ################################################################################ diff --git a/test/failure_handler/src/share/conf/solaris.properties b/test/failure_handler/src/share/conf/solaris.properties --- a/test/failure_handler/src/share/conf/solaris.properties +++ b/test/failure_handler/src/share/conf/solaris.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -64,7 +64,8 @@ system.dmesg system.prtconf system.sysdef \ process.ps process.top \ memory.swap memory.vmstat.default memory.vmstat.statistics memory.pagesize \ - net.netstat.av net.netstat.m net.netstat.s net.netstat.i net.ifconfig + net.netstat.av net.netstat.m net.netstat.s net.netstat.i net.ifconfig \ + screenshot ################################################################################ # common unix ################################################################################ @@ -110,4 +111,16 @@ net.netstat.i.args=-i 1 5 net.ifconfig.app=/sbin/ifconfig net.ifconfig.args=-a + +screenshot.app=bash +screenshot.args=-c\0\ + echo '\ + var robot = new java.awt.Robot();\ + var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();\ + var bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\ + var capture = robot.createScreenCapture(bounds);\ + var file = new java.io.File("screen.png");\ + javax.imageio.ImageIO.write(capture, "png", file);\ + ' | jshell - +screenshot.args.delimiter=\0 ################################################################################ diff --git a/test/failure_handler/src/share/conf/windows.properties b/test/failure_handler/src/share/conf/windows.properties --- a/test/failure_handler/src/share/conf/windows.properties +++ b/test/failure_handler/src/share/conf/windows.properties @@ -1,5 +1,5 @@ # -# Copyright (c) 2015, 2019, Oracle and/or its affiliates. All rights reserved. +# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved. # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. # # This code is free software; you can redistribute it and/or modify it @@ -71,7 +71,8 @@ memory.free memory.vmstat.default memory.vmstat.statistics \ memory.vmstat.slabinfo memory.vmstat.disk \ files \ - net.sockets net.statistics net.ipconfig + net.sockets net.statistics net.ipconfig \ + screenshot ################################################################################ users.current.app=id users.current.args=-a @@ -114,4 +115,16 @@ net.statistics.args=-s -e net.ipconfig.app=ipconfig net.ipconfig.args=/all + +screenshot.app=bash +screenshot.args=-c\0\ + echo '\ + var robot = new java.awt.Robot();\ + var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();\ + var bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\ + var capture = robot.createScreenCapture(bounds);\ + var file = new java.io.File(""screen.png"");\ + javax.imageio.ImageIO.write(capture, ""png"", file);\ + ' | jshell - +screenshot.args.delimiter=\0 ################################################################################