fixing path error

This commit is contained in:
Edward Chen
2022-02-28 18:42:29 -05:00
parent 0d4ee96423
commit 4e1f128eed
4 changed files with 12 additions and 7 deletions

2
.gitignore vendored
View File

@@ -10,4 +10,4 @@ __pycache__
/perf.data*
/.gdb_history
.features.txt
scripts/aby_tests/tests/*
scripts/aby_tests/tests

View File

@@ -38,7 +38,7 @@ def check(features):
cargo_features = filter_cargo_features(features)
if cargo_features:
cmd = cmd + ["--features"] + cargo_features
subprocess.run(cmd)
subprocess.run(cmd, check=True)
def build(features):
"""
@@ -65,14 +65,14 @@ def build(features):
cargo_features = filter_cargo_features(features)
if cargo_features:
cmd = cmd + ["--features"] + cargo_features
subprocess.run(cmd)
subprocess.run(cmd, check=True)
if "aby" in features:
if "c" in features:
subprocess.run(["./scripts/build_mpc_c_test.zsh"])
subprocess.run(["./scripts/build_mpc_c_test.zsh"], check=True)
if "smt" in features and "zok" in features:
subprocess.run(["./scripts/build_mpc_zokrates_test.zsh"])
subprocess.run(["./scripts/build_aby.zsh"])
subprocess.run(["./scripts/build_mpc_zokrates_test.zsh"], check=True)
subprocess.run(["./scripts/build_aby.zsh"], check=True)
def test(features):
"""

View File

@@ -1,3 +1,3 @@
#!/usr/bin/env zsh
rm -rf ./scripts/aby_tests/tests/*
rm -rf ./scripts/aby_tests/tests

View File

@@ -23,6 +23,11 @@ pub fn get_path(path: &Path, lang: &str, t: &str) -> String {
.into_string()
.unwrap();
match fs::create_dir_all("scripts/aby_tests/tests") {
Err(why) => panic!("couldn't create {}: {}", "scripts/aby_tests/tests", why),
Ok(file) => file,
};
let name = format!("{}_{}", filename, lang);
let path = format!("scripts/aby_tests/tests/{}_{}.txt", name, t);
match fs::File::create(&path) {