21
21
import com .graphicsfuzz .common .util .ParseHelper ;
22
22
import com .graphicsfuzz .common .util .ParseTimeoutException ;
23
23
import com .graphicsfuzz .common .util .ShaderJobFileOperations ;
24
+ import com .graphicsfuzz .util .ExecHelper ;
24
25
import java .io .File ;
25
26
import java .io .IOException ;
26
27
import org .junit .Rule ;
29
30
30
31
import static org .junit .Assert .assertEquals ;
31
32
import static org .junit .Assert .assertTrue ;
33
+ import static org .junit .Assert .fail ;
32
34
33
35
public class GlslReduceTest {
34
36
@@ -120,6 +122,10 @@ public void customJudgeRequiredInCustomReduction() throws Exception {
120
122
121
123
@ Test
122
124
public void checkCustomJudgeIsExecutable () throws Exception {
125
+ if (ExecHelper .IS_WINDOWS ) {
126
+ // All files are executable on Windows.
127
+ return ;
128
+ }
123
129
final File jsonFile = getShaderJobReady ();
124
130
final File emptyFile = temporaryFolder .newFile (); // Not executable
125
131
try {
@@ -130,8 +136,7 @@ public void checkCustomJudgeIsExecutable() throws Exception {
130
136
emptyFile .getAbsolutePath (),
131
137
"--output" ,
132
138
temporaryFolder .getRoot ().getAbsolutePath ()}, null );
133
- assertTrue ("An exception should have been thrown as the " +
134
- "judge script is not executable." , false );
139
+ fail ("An exception should have been thrown as the judge script is not executable." );
135
140
} catch (RuntimeException exception ) {
136
141
assertTrue (exception .getMessage ().contains ("judge script must be executable" ));
137
142
}
0 commit comments