changeset 58874:11abc8e86cee

8240904: Screen flashes on test failures when running tests from make Reviewed-by: erikj, serb
author iignatyev
date Thu, 16 Apr 2020 17:42:13 -0700
parents 5d8f906a24c5
children f5305f110a42
files test/failure_handler/src/share/conf/linux.properties test/failure_handler/src/share/conf/mac.properties test/failure_handler/src/share/conf/solaris.properties test/failure_handler/src/share/conf/windows.properties
diffstat 4 files changed, 44 insertions(+), 9 deletions(-) [+]
line wrap: on
line diff
--- a/test/failure_handler/src/share/conf/linux.properties	Thu Apr 16 16:09:47 2020 -0700
+++ b/test/failure_handler/src/share/conf/linux.properties	Thu Apr 16 17:42:13 2020 -0700
@@ -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
 ################################################################################
 
--- a/test/failure_handler/src/share/conf/mac.properties	Thu Apr 16 16:09:47 2020 -0700
+++ b/test/failure_handler/src/share/conf/mac.properties	Thu Apr 16 17:42:13 2020 -0700
@@ -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
 ################################################################################
--- a/test/failure_handler/src/share/conf/solaris.properties	Thu Apr 16 16:09:47 2020 -0700
+++ b/test/failure_handler/src/share/conf/solaris.properties	Thu Apr 16 17:42:13 2020 -0700
@@ -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
 ################################################################################
--- a/test/failure_handler/src/share/conf/windows.properties	Thu Apr 16 16:09:47 2020 -0700
+++ b/test/failure_handler/src/share/conf/windows.properties	Thu Apr 16 17:42:13 2020 -0700
@@ -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
 ################################################################################