From b6a5455b4bf96915a8e2c541807bac086ef5823e Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 20 Feb 2026 08:14:59 +0000 Subject: [PATCH 1/3] test: aztec new scaffold works --- aztec-up/bootstrap.sh | 2 +- aztec-up/test/default_scaffold.sh | 32 +++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 1 deletion(-) create mode 100755 aztec-up/test/default_scaffold.sh diff --git a/aztec-up/bootstrap.sh b/aztec-up/bootstrap.sh index 27ecf742257b..50da97b1121d 100755 --- a/aztec-up/bootstrap.sh +++ b/aztec-up/bootstrap.sh @@ -95,7 +95,7 @@ EOF } function test_cmds { - for test in amm_flow bridge_and_claim basic_install counter_contract; do + for test in amm_flow bridge_and_claim basic_install counter_contract default_scaffold; do echo "$hash:TIMEOUT=15m aztec-up/scripts/run_test.sh $test" done } diff --git a/aztec-up/test/default_scaffold.sh b/aztec-up/test/default_scaffold.sh new file mode 100755 index 000000000000..c7bd9869dfc1 --- /dev/null +++ b/aztec-up/test/default_scaffold.sh @@ -0,0 +1,32 @@ +#!/usr/bin/env bash +set -euo pipefail + +# Tests that the default scaffold generated by `aztec new` compiles and passes its tests without any modifications. +# This catches regressions in the template files produced by setup_workspace.sh (e.g. syntax errors, stale imports, +# or API changes in aztec-nr) that would otherwise go unnoticed until a user runs `aztec new` themselves. + +export LOG_LEVEL=silent + +aztec new my_contract + +# Verify workspace structure. +if [ ! -f my_contract/Nargo.toml ]; then + echo "Failed to create workspace Nargo.toml." + exit 1 +fi +if [ ! -f my_contract/contract/Nargo.toml ] || [ ! -f my_contract/contract/src/main.nr ]; then + echo "Failed to create contract crate." + exit 1 +fi +if [ ! -f my_contract/test/Nargo.toml ] || [ ! -f my_contract/test/src/lib.nr ]; then + echo "Failed to create test crate." + exit 1 +fi + +cd my_contract + +# Compile the default scaffold contract. +aztec compile + +# Run the default scaffold tests. +aztec test From 37ec015b0a9fbdb0fc5f0c38991c198cf1fc9a1f Mon Sep 17 00:00:00 2001 From: benesjan Date: Fri, 20 Feb 2026 11:00:48 +0000 Subject: [PATCH 2/3] fix --- aztec-up/test/default_scaffold.sh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/aztec-up/test/default_scaffold.sh b/aztec-up/test/default_scaffold.sh index c7bd9869dfc1..4484d9245aa3 100755 --- a/aztec-up/test/default_scaffold.sh +++ b/aztec-up/test/default_scaffold.sh @@ -25,6 +25,10 @@ fi cd my_contract +# This is is unfortunate as it makes the test worse but in CI setting the aztec version is 0.0.1 which doesn't exist as +# a remote git tag, so we need to rewrite dependencies to use local aztec-nr. +sed -i 's|aztec = .*git.*AztecProtocol/aztec-nr.*|aztec = { path="/home/ubuntu/aztec-packages/noir-projects/aztec-nr/aztec" }|' contract/Nargo.toml test/Nargo.toml + # Compile the default scaffold contract. aztec compile From 3831da6168d7bf4df33be535c0b77995f7072278 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jan=20Bene=C5=A1?= Date: Fri, 20 Feb 2026 14:57:43 +0100 Subject: [PATCH 3/3] Update aztec-up/test/default_scaffold.sh Co-authored-by: Nicolas Chamo --- aztec-up/test/default_scaffold.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/aztec-up/test/default_scaffold.sh b/aztec-up/test/default_scaffold.sh index 4484d9245aa3..d652bdbf8326 100755 --- a/aztec-up/test/default_scaffold.sh +++ b/aztec-up/test/default_scaffold.sh @@ -25,7 +25,7 @@ fi cd my_contract -# This is is unfortunate as it makes the test worse but in CI setting the aztec version is 0.0.1 which doesn't exist as +# This is unfortunate as it makes the test worse but in CI setting the aztec version is 0.0.1 which doesn't exist as # a remote git tag, so we need to rewrite dependencies to use local aztec-nr. sed -i 's|aztec = .*git.*AztecProtocol/aztec-nr.*|aztec = { path="/home/ubuntu/aztec-packages/noir-projects/aztec-nr/aztec" }|' contract/Nargo.toml test/Nargo.toml