Skip to content

Commit c54deb7

Browse files
committed
fix: revert testbase in scripts due to l1-artifiact setup
1 parent b7beb02 commit c54deb7

4 files changed

Lines changed: 37 additions & 5 deletions

File tree

l1-contracts/.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ release-out/
1515
# Dotenv file
1616
.env
1717

18-
generated
18+
/generated
1919
lcov.info
2020

2121
# Local foundry env
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
// SPDX-License-Identifier: Apache-2.0
2+
pragma solidity >=0.8.27;
3+
4+
import {IVerifier} from "@aztec/core/interfaces/IVerifier.sol";
5+
6+
contract HonkVerifier is IVerifier {
7+
function verify(bytes calldata, bytes32[] calldata) external pure override(IVerifier) returns (bool) {
8+
return true;
9+
}
10+
}

l1-contracts/test/script/DeployAztecL1Contracts.t.sol

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,14 +2,25 @@
22
// Copyright 2024 Aztec Labs.
33
pragma solidity >=0.8.27;
44

5+
import {Test} from "forge-std/Test.sol";
56
import {stdJson} from "forge-std/StdJson.sol";
67

7-
import {TestBase} from "@test/base/Base.sol";
88
import {DeployAztecL1Contracts} from "../../script/deploy/DeployAztecL1Contracts.s.sol";
99

10-
contract DeployAztecL1ContractsTest is TestBase {
10+
contract DeployAztecL1ContractsTest is Test {
1111
using stdJson for string;
1212

13+
modifier skipWhenCoverage() {
14+
if (isCoverage()) {
15+
vm.skip(true);
16+
}
17+
_;
18+
}
19+
20+
function isCoverage() internal view returns (bool) {
21+
return vm.envOr("FORGE_COVERAGE", false);
22+
}
23+
1324
// Load environment variables from generated/default.json
1425
// This file is copied from spartan/environments/default.json by bootstrap.sh
1526
function setUp() public skipWhenCoverage {

l1-contracts/test/script/DeployRollupForUpgrade.t.sol

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@
22
// Copyright 2024 Aztec Labs.
33
pragma solidity >=0.8.27;
44

5+
import {Test} from "forge-std/Test.sol";
56
import {stdJson} from "forge-std/StdJson.sol";
67

7-
import {TestBase} from "@test/base/Base.sol";
88
import {DeployAztecL1Contracts, DeployAztecL1ContractsOutput} from "../../script/deploy/DeployAztecL1Contracts.s.sol";
99
import {DeployRollupForUpgrade} from "../../script/deploy/DeployRollupForUpgrade.s.sol";
1010
import {Rollup} from "@aztec/core/Rollup.sol";
@@ -18,9 +18,20 @@ import {Registry} from "@aztec/governance/Registry.sol";
1818
* 2. It uses existing infrastructure contracts correctly
1919
* 3. The new rollup is properly registered (if deployer is owner)
2020
*/
21-
contract DeployRollupForUpgradeTest is TestBase {
21+
contract DeployRollupForUpgradeTest is Test {
2222
using stdJson for string;
2323

24+
modifier skipWhenCoverage() {
25+
if (isCoverage()) {
26+
vm.skip(true);
27+
}
28+
_;
29+
}
30+
31+
function isCoverage() internal view returns (bool) {
32+
return vm.envOr("FORGE_COVERAGE", false);
33+
}
34+
2435
// Load environment variables from generated/default.json
2536
// This file is copied from spartan/environments/default.json by bootstrap.sh
2637
function setUp() public skipWhenCoverage {

0 commit comments

Comments
 (0)