Skip to content
This repository was archived by the owner on Jul 5, 2024. It is now read-only.

Commit 350a7a2

Browse files
adria0adria0
and
adria0
authored
Fix testool manifest and add test it in github actions (#1535)
### Description Testool failed to compile after #1524, this is due: - testool compilation is not checked in github actions - some functions required are not only available without `test-circuits` feature ### Type of change Bug fix (non-breaking change which fixes an issue) ### Contents - Fixes Cargo.toml - Adds basic test of testool in github actions --------- Co-authored-by: adria0 <adria0@nowhere>
1 parent 26bf6ba commit 350a7a2

File tree

5 files changed

+17
-9
lines changed

5 files changed

+17
-9
lines changed

.github/workflows/ci.yml

+5-1
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@ jobs:
7676
with:
7777
command: test
7878
args: --verbose --release --all --all-features --exclude integration-tests --exclude circuit-benchmarks serial_ -- --ignored --test-threads 1
79-
79+
- name: Run testool internal tests
80+
uses: actions-rs/cargo@v1
81+
with:
82+
command: test
83+
args: --release --manifest-path testool/Cargo.toml
8084
build:
8185
needs: [skip_check]
8286
if: |

testool/Cargo.toml

+1-2
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ strum_macros = "0.24"
2929
thiserror = "1.0"
3030
toml = "0.5"
3131
yaml-rust = "0.4.5"
32-
zkevm-circuits = { path="../zkevm-circuits", features=["test-util"] }
32+
zkevm-circuits = { path="../zkevm-circuits", features=["test-util", "test-circuits"] }
3333
rand_chacha = "0.3"
3434
rand = "0.8"
3535
halo2_proofs = { git = "https://github.com/privacy-scaling-explorations/halo2.git", tag = "v2023_04_20" }
@@ -38,4 +38,3 @@ urlencoding = "2.1.2"
3838

3939
[features]
4040
default = []
41-
ignore-test-docker = []

testool/README.md

+8
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@ To use it, just compile with `cargo build --release` and run `../target/release/
66

77
This tool at this moment has 2 main functionalities: run raw bytecode and run ethereum tests.
88

9+
10+
## Setup docker
11+
12+
Code is precompiled and kept in the `codehash.txt`` file, if you need to compile more code (mainly because you are updating the testspecs commit), you have to setup docker:
13+
14+
- `docker build docker/lllc -t lllc`
15+
- `docker build docker/solc -t solc`
16+
917
## Run oneliner spec
1018

1119
The oneliner spec is invoked by using `--oneliner` parameter

testool/src/compiler.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ impl Compiler {
320320
#[cfg(test)]
321321
mod test {
322322
#[test]
323-
#[cfg(not(feature = "ignore-test-docker"))]
323+
#[ignore]
324324
fn test_docker_lll() -> anyhow::Result<()> {
325325
let out = super::Compiler::new(true, None)?.lll(
326326
"[[0]] (+ 0xffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffffff 4)",
@@ -332,7 +332,7 @@ mod test {
332332
Ok(())
333333
}
334334
#[test]
335-
#[cfg(not(feature = "ignore-test-docker"))]
335+
#[ignore]
336336
fn test_docker_yul() -> anyhow::Result<()> {
337337
let out = super::Compiler::new(true, None)?.yul(
338338
r#"
@@ -355,7 +355,7 @@ mod test {
355355
Ok(())
356356
}
357357
#[test]
358-
#[cfg(not(feature = "ignore-test-docker"))]
358+
#[ignore]
359359
fn test_docker_solidity() -> anyhow::Result<()> {
360360
let out = super::Compiler::new(true, None)?.solidity("contract A{}")?;
361361
assert_eq!(

testool/test-docker.sh

-3
This file was deleted.

0 commit comments

Comments
 (0)