Fix feature-gating of test-programs (#612)
* Fix feature-gating of test-programs This commit fixes bugs in enabling feature-gating of `test-programs` which was introduced in #600. It turns out, #600 accidentally disabled `test-programs` from ever running, and this commit fixes that. * Fix the CI
This commit is contained in:
@@ -23,3 +23,6 @@ tempfile = "3.1.0"
|
||||
os_pipe = "0.9"
|
||||
anyhow = "1.0.19"
|
||||
wat = "1.0.2"
|
||||
|
||||
[features]
|
||||
test_programs = []
|
||||
|
||||
@@ -4,11 +4,11 @@
|
||||
//! to automatically run the files in parallel.
|
||||
|
||||
fn main() {
|
||||
#[cfg(features = "test-programs")]
|
||||
#[cfg(feature = "test_programs")]
|
||||
wasi_tests::build_and_generate_tests()
|
||||
}
|
||||
|
||||
#[cfg(features = "test-programs")]
|
||||
#[cfg(feature = "test_programs")]
|
||||
mod wasi_tests {
|
||||
use std::env;
|
||||
use std::fs::{read_dir, DirEntry, File};
|
||||
@@ -16,7 +16,7 @@ mod wasi_tests {
|
||||
use std::path::{Path, PathBuf};
|
||||
use std::process::{Command, Stdio};
|
||||
|
||||
fn build_and_generate_tests() {
|
||||
pub(super) fn build_and_generate_tests() {
|
||||
// Validate if any of test sources are present and if they changed
|
||||
// This should always work since there is no submodule to init anymore
|
||||
let bin_tests = std::fs::read_dir("wasi-tests/src/bin").unwrap();
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
#![cfg(features = "test-programs")]
|
||||
#![cfg(feature = "test_programs")]
|
||||
mod runtime;
|
||||
mod utils;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user