diff --git a/necessist/tests/third_party_common/mod.rs b/necessist/tests/third_party_common/mod.rs index b3164622..19a24e29 100644 --- a/necessist/tests/third_party_common/mod.rs +++ b/necessist/tests/third_party_common/mod.rs @@ -11,6 +11,7 @@ use std::{ fmt::Write as _, fs::{read_dir, read_to_string, remove_file, write}, io::{stderr, Read, Write}, + ops::Not, panic::{set_hook, take_hook}, path::{Path, PathBuf}, process::{exit, Command}, @@ -79,10 +80,10 @@ struct Test { #[serde(default)] source_files: Vec, - /// If false (the default), Necessist dumps removal candidates and exits (i.e., - /// --dump-candidates is passed to Necessist); if true, Necessist is run with --verbose + /// If true, Necessist dumps removal candidates and exits (i.e., --dump-candidates is passed to + /// Necessist); if false (the default), Necessist is run with --verbose #[serde(default)] - full: bool, + parsing_only: bool, /// Additional arguments to pass to Necessist; appended at the end of the command #[serde(default)] @@ -519,10 +520,10 @@ fn run_test(tempdir: &Path, path: &Path, test: &Test) -> (String, Duration) { if let Some(framework) = &test.framework { exec = exec.args(&["--framework", framework]); } - if test.full { - exec = exec.arg("--verbose"); - } else { + if test.parsing_only { exec = exec.arg("--dump-candidates"); + } else { + exec = exec.arg("--verbose"); } for source_file in &test.source_files { exec = exec.arg( @@ -587,7 +588,7 @@ fn run_test(tempdir: &Path, path: &Path, test: &Test) -> (String, Duration) { if test.check_sqlite_urls { assert!(test.rev.is_some()); - assert!(test.full); + assert!(!test.parsing_only); check_sqlite_urls(tempdir, &root, test); } } @@ -790,7 +791,7 @@ fn readme_is_current() { name.to_string_lossy(), test.rev.map(|s| s + " ").unwrap_or_default(), test.framework.map(|s| s + " ").unwrap_or_default(), - test.full.to_x_space(), + test.parsing_only.not().to_x_space(), target_os_includes(test.target_os.as_ref(), "linux").to_x_space(), target_os_includes(test.target_os.as_ref(), "macos").to_x_space(), target_os_includes(test.target_os.as_ref(), "windows").to_x_space(), diff --git a/necessist/tests/third_party_tests/0/chainlink.toml b/necessist/tests/third_party_tests/0/chainlink.toml index aa260d88..acfb6754 100644 --- a/necessist/tests/third_party_tests/0/chainlink.toml +++ b/necessist/tests/third_party_tests/0/chainlink.toml @@ -1,2 +1,3 @@ url = "https://github.com/smartcontractkit/chainlink" rev = "v2.18.0" +parsing_only = true diff --git a/necessist/tests/third_party_tests/0/chainlink_hardhat.toml b/necessist/tests/third_party_tests/0/chainlink_hardhat.toml index 87a06379..1ad3a711 100644 --- a/necessist/tests/third_party_tests/0/chainlink_hardhat.toml +++ b/necessist/tests/third_party_tests/0/chainlink_hardhat.toml @@ -2,6 +2,7 @@ url = "https://github.com/smartcontractkit/chainlink" rev = "v2.18.0" subdir = "contracts" framework = "hardhat" +parsing_only = true [config] ignored_functions = ["bigNumEquals", "evmRevert"] diff --git a/necessist/tests/third_party_tests/0/crates_io.toml b/necessist/tests/third_party_tests/0/crates_io.toml index 091fdd1f..d18afc74 100644 --- a/necessist/tests/third_party_tests/0/crates_io.toml +++ b/necessist/tests/third_party_tests/0/crates_io.toml @@ -3,3 +3,4 @@ # without `src` directories, and `src` directories with `tests` subdirectories. url = "https://github.com/rust-lang/crates.io" rev = "5643e3fb5d53d3b8cc5620d583068ae17e82b5c3" +parsing_only = true diff --git a/necessist/tests/third_party_tests/0/go_src_encoding_base64.toml b/necessist/tests/third_party_tests/0/go_src_encoding_base64.toml index 82d47bd8..7e5267a2 100644 --- a/necessist/tests/third_party_tests/0/go_src_encoding_base64.toml +++ b/necessist/tests/third_party_tests/0/go_src_encoding_base64.toml @@ -1,6 +1,5 @@ url = "https://github.com/golang/go" rev = "go1.23.0" framework = "go" -full = true subdir = "src/encoding/base64" diff --git a/necessist/tests/third_party_tests/0/go_src_encoding_binary.toml b/necessist/tests/third_party_tests/0/go_src_encoding_binary.toml index a8c17890..462759c6 100644 --- a/necessist/tests/third_party_tests/0/go_src_encoding_binary.toml +++ b/necessist/tests/third_party_tests/0/go_src_encoding_binary.toml @@ -6,6 +6,5 @@ rev = "go1.23.0" target_os = ["linux", "macos"] framework = "go" -full = true subdir = "src/encoding/binary" diff --git a/necessist/tests/third_party_tests/0/go_src_mime.toml b/necessist/tests/third_party_tests/0/go_src_mime.toml index ffd982fc..90f344ce 100644 --- a/necessist/tests/third_party_tests/0/go_src_mime.toml +++ b/necessist/tests/third_party_tests/0/go_src_mime.toml @@ -2,7 +2,6 @@ url = "https://github.com/golang/go" rev = "go1.23.0" target_os = ["linux", "macos"] framework = "go" -full = true config_mandatory = true subdir = "src/mime" diff --git a/necessist/tests/third_party_tests/0/go_src_net_url.toml b/necessist/tests/third_party_tests/0/go_src_net_url.toml index b80aae4f..e90a726f 100644 --- a/necessist/tests/third_party_tests/0/go_src_net_url.toml +++ b/necessist/tests/third_party_tests/0/go_src_net_url.toml @@ -1,6 +1,5 @@ url = "https://github.com/golang/go" rev = "go1.23.0" framework = "go" -full = true subdir = "src/net/url" diff --git a/necessist/tests/third_party_tests/0/go_src_os.toml b/necessist/tests/third_party_tests/0/go_src_os.toml index 388b6995..52801933 100644 --- a/necessist/tests/third_party_tests/0/go_src_os.toml +++ b/necessist/tests/third_party_tests/0/go_src_os.toml @@ -24,7 +24,6 @@ target_os = ["linux", "macos"] subdir = "src/os" framework = "go" source_files = ["os_test.go"] -full = true config_mandatory = true [config] diff --git a/necessist/tests/third_party_tests/0/operator-filter-registry.toml b/necessist/tests/third_party_tests/0/operator-filter-registry.toml index 93e24b18..4ee3aa98 100644 --- a/necessist/tests/third_party_tests/0/operator-filter-registry.toml +++ b/necessist/tests/third_party_tests/0/operator-filter-registry.toml @@ -1,5 +1,6 @@ url = "https://github.com/ProjectOpenSea/operator-filter-registry" rev = "v1.4.2" +parsing_only = true [config] ignored_functions = ["vm.prank", "vm.startPrank", "vm.stopPrank"] diff --git a/necessist/tests/third_party_tests/0/proptest_https.toml b/necessist/tests/third_party_tests/0/proptest_https.toml index 64f96a1d..1a16584b 100644 --- a/necessist/tests/third_party_tests/0/proptest_https.toml +++ b/necessist/tests/third_party_tests/0/proptest_https.toml @@ -3,4 +3,3 @@ url = "https://github.com/proptest-rs/proptest" rev = "b71253807372932f72a71b1af7975371a41e7c88" subdir = "proptest" source_files = ["src/sample.rs"] -full = true diff --git a/necessist/tests/third_party_tests/0/pyth.toml b/necessist/tests/third_party_tests/0/pyth.toml index 403a2c25..a591583d 100644 --- a/necessist/tests/third_party_tests/0/pyth.toml +++ b/necessist/tests/third_party_tests/0/pyth.toml @@ -2,3 +2,4 @@ url = "https://github.com/pyth-network/pyth-crosschain" target_os = ["linux", "macos"] subdir = "pythnet/message_buffer" framework = "anchor" +parsing_only = true diff --git a/necessist/tests/third_party_tests/0/uniswap_v3-core.toml b/necessist/tests/third_party_tests/0/uniswap_v3-core.toml index 0e94f675..23ecc640 100644 --- a/necessist/tests/third_party_tests/0/uniswap_v3-core.toml +++ b/necessist/tests/third_party_tests/0/uniswap_v3-core.toml @@ -1,4 +1,5 @@ url = "https://github.com/Uniswap/v3-core" +parsing_only = true [config] ignored_functions = ["checkObservationEquals", "snapshotGasCost"] diff --git a/necessist/tests/third_party_tests/1/chainlink_foundry.toml b/necessist/tests/third_party_tests/1/chainlink_foundry.toml index 989df050..58963368 100644 --- a/necessist/tests/third_party_tests/1/chainlink_foundry.toml +++ b/necessist/tests/third_party_tests/1/chainlink_foundry.toml @@ -3,7 +3,6 @@ rev = "v2.18.0" subdir = "contracts" framework = "foundry" source_files = ["src/v0.8/transmission/test/EIP_712_1014_4337.t.sol"] -full = true [config] ignored_functions = ["vm.prank", "vm.startPrank", "vm.stopPrank"] diff --git a/necessist/tests/third_party_tests/1/diem.toml b/necessist/tests/third_party_tests/1/diem.toml index 025894f4..5c5b126d 100644 --- a/necessist/tests/third_party_tests/1/diem.toml +++ b/necessist/tests/third_party_tests/1/diem.toml @@ -1,3 +1,4 @@ # https://www.reddit.com/r/rust/comments/s6olun/comment/ht5l2kj url = "https://github.com/diem/diem" rev = "diem-core-v1.4.4" +parsing_only = true diff --git a/necessist/tests/third_party_tests/1/go_src_os_user.toml b/necessist/tests/third_party_tests/1/go_src_os_user.toml index e4b90f9c..998f8ba7 100644 --- a/necessist/tests/third_party_tests/1/go_src_os_user.toml +++ b/necessist/tests/third_party_tests/1/go_src_os_user.toml @@ -1,7 +1,6 @@ url = "https://github.com/golang/go" rev = "go1.23.0" framework = "go" -full = true config_mandatory = true subdir = "src/os/user" diff --git a/necessist/tests/third_party_tests/1/go_src_testing_iotest.toml b/necessist/tests/third_party_tests/1/go_src_testing_iotest.toml index 1f8415fb..b665d2c6 100644 --- a/necessist/tests/third_party_tests/1/go_src_testing_iotest.toml +++ b/necessist/tests/third_party_tests/1/go_src_testing_iotest.toml @@ -1,6 +1,5 @@ url = "https://github.com/golang/go" rev = "go1.23.0" framework = "go" -full = true subdir = "src/testing/iotest" diff --git a/necessist/tests/third_party_tests/1/go_src_text_template_parse.toml b/necessist/tests/third_party_tests/1/go_src_text_template_parse.toml index 0a5fe81e..5ff307d5 100644 --- a/necessist/tests/third_party_tests/1/go_src_text_template_parse.toml +++ b/necessist/tests/third_party_tests/1/go_src_text_template_parse.toml @@ -1,6 +1,5 @@ url = "https://github.com/golang/go" rev = "go1.23.0" framework = "go" -full = true subdir = "src/text/template/parse" diff --git a/necessist/tests/third_party_tests/1/minio.toml b/necessist/tests/third_party_tests/1/minio.toml index 3fcac84c..12be1acc 100644 --- a/necessist/tests/third_party_tests/1/minio.toml +++ b/necessist/tests/third_party_tests/1/minio.toml @@ -1,3 +1,4 @@ # https://blog.kowalczyk.info/article/9afe3485f2204f1bb43217d70f7b87d4/big-projects-written-in-go.html url = "https://github.com/minio/minio" rev = "RELEASE.2024-11-07T00-52-20Z" +parsing_only = true diff --git a/necessist/tests/third_party_tests/1/proptest_ssh.toml b/necessist/tests/third_party_tests/1/proptest_ssh.toml index b0a8571b..09226e9b 100644 --- a/necessist/tests/third_party_tests/1/proptest_ssh.toml +++ b/necessist/tests/third_party_tests/1/proptest_ssh.toml @@ -3,4 +3,3 @@ url = "git@github.com:proptest-rs/proptest" rev = "b71253807372932f72a71b1af7975371a41e7c88" subdir = "proptest" source_files = ["src/sample.rs"] -full = true diff --git a/necessist/tests/third_party_tests/1/seaport.toml b/necessist/tests/third_party_tests/1/seaport.toml index 0d5e7f39..fed262f1 100644 --- a/necessist/tests/third_party_tests/1/seaport.toml +++ b/necessist/tests/third_party_tests/1/seaport.toml @@ -1,6 +1,7 @@ url = "https://github.com/ProjectOpenSea/seaport" rev = "1.6" framework = "hardhat" +parsing_only = true [config] ignored_functions = ["checkExpectedEvents"] diff --git a/necessist/tests/third_party_tests/1/squads-protocol_v4.toml b/necessist/tests/third_party_tests/1/squads-protocol_v4.toml index f83b9f8b..166e23a6 100644 --- a/necessist/tests/third_party_tests/1/squads-protocol_v4.toml +++ b/necessist/tests/third_party_tests/1/squads-protocol_v4.toml @@ -12,8 +12,6 @@ source_files = [ "tests/suites/examples/immediate-execution.ts", ] -full = true - args = [ "--allow=instrumentation-nonbuildable", "--", diff --git a/necessist/tests/third_party_tests/1/uniswap_v3-core_factory.toml b/necessist/tests/third_party_tests/1/uniswap_v3-core_factory.toml index fc7a1ed8..a1925227 100644 --- a/necessist/tests/third_party_tests/1/uniswap_v3-core_factory.toml +++ b/necessist/tests/third_party_tests/1/uniswap_v3-core_factory.toml @@ -1,3 +1,2 @@ url = "https://github.com/Uniswap/v3-core" source_files = ["test/UniswapV3Factory.spec.ts"] -full = true