Skip to content

Commit 52d86e9

Browse files
committed
Add error message if compilation assert fails
1 parent 1225852 commit 52d86e9

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

test/test_examples.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ def backend(request):
4545

4646
build_dir = Path(request.config.getoption("--builddir"))
4747

48-
# Remove the build dir if it already exists
48+
# Remove the contents of the build directory if it already exists
4949
if build_dir.exists():
5050
for root, _, files in os.walk(build_dir, topdown=False):
5151
for name in files:
@@ -415,7 +415,7 @@ def program(request, backend):
415415
compilation_return_code = subprocess.run(
416416
["arduino-cli", "compile", f"{sketch_path}", "-b", f"{BOARD_CONFIG}", "--output-dir", f"{build_directory}"], shell=True).returncode
417417

418-
assert compilation_return_code == 0
418+
assert compilation_return_code == 0, "{example_name} failed to compile"
419419

420420
hex_file = build_directory / f"{os.path.basename(sketch_path)}.hex"
421421

0 commit comments

Comments
 (0)