Skip to content

Commit c8c546b

Browse files
committed
8240904: Screen flashes on test failures when running tests from make
Reviewed-by: mdoerr Backport-of: 59563a4
1 parent b77a165 commit c8c546b

File tree

4 files changed

+44
-9
lines changed

4 files changed

+44
-9
lines changed

test/failure_handler/src/share/conf/linux.properties

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -108,7 +108,16 @@ net.app=netstat
108108
net.sockets.args=-aeeopv
109109
net.statistics.args=-sv
110110

111-
screenshot.app=gnome-screenshot
112-
screenshot.args= -f screen.png
111+
screenshot.app=bash
112+
screenshot.args=-c\0\
113+
echo '\
114+
var robot = new java.awt.Robot();\
115+
var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();\
116+
var bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\
117+
var capture = robot.createScreenCapture(bounds);\
118+
var file = new java.io.File("screen.png");\
119+
javax.imageio.ImageIO.write(capture, "png", file);\
120+
' | jshell -
121+
screenshot.args.delimiter=\0
113122
################################################################################
114123

test/failure_handler/src/share/conf/mac.properties

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -120,5 +120,5 @@ scutil.nwi.args=--nwi
120120
scutil.proxy.args=--proxy
121121

122122
screenshot.app=screencapture
123-
screenshot.args= -x screen1.png screen2.png screen3.png screen4.png screen5.png
123+
screenshot.args=-x screen1.png screen2.png screen3.png screen4.png screen5.png
124124
################################################################################

test/failure_handler/src/share/conf/solaris.properties

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, 2018, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -64,7 +64,8 @@ environment=\
6464
system.dmesg system.prtconf system.sysdef \
6565
process.ps process.top \
6666
memory.swap memory.vmstat.default memory.vmstat.statistics memory.pagesize \
67-
netstat.av netstat.m netstat.s netstat.i
67+
netstat.av netstat.m netstat.s netstat.i \
68+
screenshot
6869
################################################################################
6970
# common unix
7071
################################################################################
@@ -108,4 +109,16 @@ netstat.av.args=-av
108109
netstat.m.args=-m
109110
netstat.s.args=-s
110111
netstat.i.args=-i 1 5
112+
113+
screenshot.app=bash
114+
screenshot.args=-c\0\
115+
echo '\
116+
var robot = new java.awt.Robot();\
117+
var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();\
118+
var bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\
119+
var capture = robot.createScreenCapture(bounds);\
120+
var file = new java.io.File("screen.png");\
121+
javax.imageio.ImageIO.write(capture, "png", file);\
122+
' | jshell -
123+
screenshot.args.delimiter=\0
111124
################################################################################

test/failure_handler/src/share/conf/windows.properties

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
#
2-
# Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
2+
# Copyright (c) 2015, 2020, Oracle and/or its affiliates. All rights reserved.
33
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
44
#
55
# This code is free software; you can redistribute it and/or modify it
@@ -71,7 +71,8 @@ environment=\
7171
memory.free memory.vmstat.default memory.vmstat.statistics \
7272
memory.vmstat.slabinfo memory.vmstat.disk \
7373
files \
74-
net.sockets net.statistics
74+
net.sockets net.statistics \
75+
screenshot
7576
################################################################################
7677
users.current.app=id
7778
users.current.args=-a
@@ -112,4 +113,16 @@ net.sockets.args=-c\0netstat -b -a -t -o || netstat -a -t -o
112113
net.sockets.args.delimiter=\0
113114
net.statistics.app=netstat
114115
net.statistics.args=-s -e
116+
117+
screenshot.app=bash
118+
screenshot.args=-c\0\
119+
echo '\
120+
var robot = new java.awt.Robot();\
121+
var ge = java.awt.GraphicsEnvironment.getLocalGraphicsEnvironment();\
122+
var bounds = ge.getDefaultScreenDevice().getDefaultConfiguration().getBounds();\
123+
var capture = robot.createScreenCapture(bounds);\
124+
var file = new java.io.File(""screen.png"");\
125+
javax.imageio.ImageIO.write(capture, ""png"", file);\
126+
' | jshell -
127+
screenshot.args.delimiter=\0
115128
################################################################################

0 commit comments

Comments
 (0)