From 7c029a5d97b6d615660c3af603137e15257d672b Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Thu, 4 Jul 2024 08:56:39 +0100 Subject: [PATCH 1/2] testing: fix mlir-opt check for MacOS make --- Makefile | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index b52a0de2fc..cd5d4cbf8b 100644 --- a/Makefile +++ b/Makefile @@ -59,11 +59,11 @@ tests-marimo: @echo "All marimo tests passed successfully." tests-marimo-mlir: - @if command -v mlir-opt &> /dev/null; then - @echo "MLIR is installed, running tests." - else - @echo "MLIR is not installed, skipping tests." - exit 0 + @if command -v mlir-opt &> /dev/null; then \ + echo "MLIR is installed, running tests."; \ + else \ + echo "MLIR is not installed, skipping tests."; \ + exit 0; \ fi @for file in docs/marimo/mlir/*.py; do \ echo "Running $$file"; \ From 3d1ea041a581548925fc9ceeadcc3f3875b9b1a7 Mon Sep 17 00:00:00 2001 From: Sasha Lopoukhine Date: Thu, 4 Jul 2024 09:06:37 +0100 Subject: [PATCH 2/2] testing: don't print the output of marimo unless there was an error --- Makefile | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index cd5d4cbf8b..c19d6f5b8a 100644 --- a/Makefile +++ b/Makefile @@ -54,7 +54,11 @@ tests-toy: filecheck-toy pytest-toy tests-marimo: @for file in docs/marimo/*.py; do \ echo "Running $$file"; \ - python3 "$$file" || exit 1; \ + error_message=$$(python3 "$$file" 2>&1) || { \ + echo "Error running $$file"; \ + echo "$$error_message"; \ + exit 1; \ + }; \ done @echo "All marimo tests passed successfully." @@ -67,7 +71,11 @@ tests-marimo-mlir: fi @for file in docs/marimo/mlir/*.py; do \ echo "Running $$file"; \ - python3 "$$file" || exit 1; \ + error_message=$$(python3 "$$file" 2>&1) || { \ + echo "Error running $$file"; \ + echo "$$error_message"; \ + exit 1; \ + }; \ done @echo "All marimo mlir tests passed successfully."