Move cargo tests to compiletest.#198
Move cargo tests to compiletest.#198danielsn merged 5 commits intomodel-checking:main-152-2021-06-07from
Conversation
adpaco-aws
left a comment
There was a problem hiding this comment.
This looks great! Could we use CargoRMC and cargo-rmc for the enum variant and its associated string?
| parser.add_argument("--mangler", default="v0") | ||
| parser.add_argument("--visualize", action="store_true") | ||
| parser.add_argument("--srcdir", default=".") | ||
| parser.add_argument("--target-dir", default="target", |
There was a problem hiding this comment.
I don't know how to comment on a non-changed file, but should we be adding this argument to scripts/rmc as well?
There was a problem hiding this comment.
I thought about that, but I could not come to a conclusion. Normally, when someone runs cargo, they expect all artifacts (besides Cargo.lock) to be in the target directory. rustc has a somewhat similar option --out-dir for specifying the directory of the compiled file. However, it's not really treated as a build directory and I don't know if we should treat it as such. So, I think this is a decision for the team to make.
There was a problem hiding this comment.
In addition to @bdalrhm explanation, I would like to point out that RMC's workflow is more similar to CBMC's: It does generate a verification output, not a compiled program. So it makes sense for us to have this --target-dir flag for cargo-rmc but not for rmc itself.
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
* Move cargo tests to compiletest. * Rename `cargo` to `cargo-rmc`. * Add an expected line to simple-main test. Co-authored-by: Adrian Palacios <73246657+adpaco-aws@users.noreply.github.com>
Description of changes:
This PR moves cargo tests to compiletest.
expected.*files are renamed to*.expectedto make use of available convenience functions. Note that a--target-diroption is added to change the defaulttargetdirectories for cargo builds tobuild/<arch>/test/cargo/<proj-name>/<function-name>/targetand avoid race problems while running cargo tests concurrently. For consistency, other generated files are also moved into the specified target directory.Resolved issues:
Resolves #177
Call-outs:
Testing:
cargo-rmc-testsis moved and renamed tosrc/test/cargoChecklist
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 and MIT licenses.