Skip to content

Commit d4d7a5e

Browse files
committed
Restore custom error message in test_sdist_native_cc
1 parent 0d4249a commit d4d7a5e

File tree

2 files changed

+7
-2
lines changed

2 files changed

+7
-2
lines changed

product/gradle-plugin/src/test/integration/data/PythonReqs/sdist_native_cc/app/sdist_native/setup.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@
77
import os
88
import subprocess
99
compiler = os.environ.get("CC", "gcc")
10-
subprocess.check_call([compiler])
10+
try:
11+
subprocess.check_call([compiler])
12+
except OSError:
13+
# FileNotFoundError message doesn't contain the filename on Windows.
14+
print("Failed to run " + compiler)
15+
raise
1116

1217
setup(
1318
name="sdist_native_cc",

product/gradle-plugin/src/test/integration/test_gradle_plugin.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1275,7 +1275,7 @@ def sdist_native(self, name):
12751275
run = self.RunGradle(*layers, succeed=False)
12761276

12771277
setup_error = (
1278-
"No such file or directory: 'Chaquopy_cannot_compile_native_code'"
1278+
"Failed to run Chaquopy_cannot_compile_native_code"
12791279
if name == "sdist_native_cc"
12801280
else "Chaquopy cannot compile native code"
12811281
)

0 commit comments

Comments
 (0)