From d6b8835656ba4aeb8d72a8b3b5307e26ac4fbe1f Mon Sep 17 00:00:00 2001 From: zeme Date: Wed, 1 Jul 2026 16:17:30 +0200 Subject: [PATCH 1/2] Run cabal update in plinth-certifier-tests.py --- scripts/plinth-certifier-tests.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/scripts/plinth-certifier-tests.py b/scripts/plinth-certifier-tests.py index 5bb33076e3c..57f6d8240bc 100755 --- a/scripts/plinth-certifier-tests.py +++ b/scripts/plinth-certifier-tests.py @@ -173,6 +173,13 @@ def cmd_build(args: argparse.Namespace) -> int: cert_dir.mkdir(parents=True, exist_ok=True) + print("--- cabal update ---") + update = subprocess.run(["cabal", "update"]) + if update.returncode != 0: + print(f"WARNING: cabal update exited with code {update.returncode}", file=sys.stderr) + print("Continuing to attempt the build anyway...", file=sys.stderr) + print() + print(f"--- cabal build {' '.join(targets)} ---") result = subprocess.run( ["cabal", "build", *targets, From 70b07a17fa63121437fc58e30fc22935ac4107a7 Mon Sep 17 00:00:00 2001 From: zeme Date: Wed, 1 Jul 2026 16:27:06 +0200 Subject: [PATCH 2/2] wip --- scripts/plinth-certifier-tests.py | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/scripts/plinth-certifier-tests.py b/scripts/plinth-certifier-tests.py index 57f6d8240bc..d24e36150ee 100755 --- a/scripts/plinth-certifier-tests.py +++ b/scripts/plinth-certifier-tests.py @@ -176,8 +176,7 @@ def cmd_build(args: argparse.Namespace) -> int: print("--- cabal update ---") update = subprocess.run(["cabal", "update"]) if update.returncode != 0: - print(f"WARNING: cabal update exited with code {update.returncode}", file=sys.stderr) - print("Continuing to attempt the build anyway...", file=sys.stderr) + die(f"cabal update failed (exit code {update.returncode})") print() print(f"--- cabal build {' '.join(targets)} ---") @@ -187,8 +186,7 @@ def cmd_build(args: argparse.Namespace) -> int: ) if result.returncode != 0: - print(f"WARNING: cabal build exited with code {result.returncode}", file=sys.stderr) - print("Continuing to check any certificates that were produced...", file=sys.stderr) + die(f"cabal build failed (exit code {result.returncode})") print() return result.returncode @@ -441,8 +439,8 @@ def cmd_run(args: argparse.Namespace) -> int: clean=args.clean, targets=args.targets, ) - build_rc = cmd_build(build_ns) - # Continue even if build had warnings + # cmd_build aborts the script (via die) if cabal update or cabal build fails + cmd_build(build_ns) # Check phase check_ns = argparse.Namespace(