GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Skip JextractLocator executability tests on OSes without an execute b… · netty/netty@c413a9c

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • jextract-maven-plugin/src/test/java/io/netty/build/jextract
    • JextractLocatorTest.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎jextract-maven-plugin/src/test/java/io/netty/build/jextract/JextractLocatorTest.java‎

Copy file name to clipboardExpand all lines: jextract-maven-plugin/src/test/java/io/netty/build/jextract/JextractLocatorTest.java
+5-2Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
import static org.junit.jupiter.api.Assertions.assertEquals;
2525
import static org.junit.jupiter.api.Assertions.assertThrows;
2626
import static org.junit.jupiter.api.Assertions.assertTrue;
27+
import static org.junit.jupiter.api.Assumptions.assumeTrue;
2728

2829
class JextractLocatorTest {
2930

@@ -110,7 +111,8 @@ void throwsWhenNoSourceConfigured() {
110111
void throwsWhenExplicitPathIsNotExecutable() throws Exception {
111112
final File notExec = new File(tmp, "jextract");
112113
assertTrue(notExec.createNewFile());
113-
assertTrue(notExec.setExecutable(false));
114+
assumeTrue(notExec.setExecutable(false) && !notExec.canExecute(),
115+
"platform cannot represent a non-executable file (e.g. Windows NTFS)");
114116

115117
final JextractException e = assertThrows(JextractException.class, () ->
116118
JextractLocator.builder()
@@ -124,7 +126,8 @@ void throwsWhenExplicitPathIsNotExecutable() throws Exception {
124126
void throwsWhenJextractEnvIsNotExecutable() throws Exception {
125127
final File notExec = new File(tmp, "jextract");
126128
assertTrue(notExec.createNewFile());
127-
assertTrue(notExec.setExecutable(false));
129+
assumeTrue(notExec.setExecutable(false) && !notExec.canExecute(),
130+
"platform cannot represent a non-executable file (e.g. Windows NTFS)");
128131

129132
final JextractException e = assertThrows(JextractException.class, () ->
130133
JextractLocator.builder()

0 commit comments

Comments
0 (0)
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.