diff --git a/.gitignore b/.gitignore index 2de4969..f9b8ef8 100644 --- a/.gitignore +++ b/.gitignore @@ -2,7 +2,6 @@ build /venv /api/static/ /opencv -/emtest/target /dataset/local /detection/model /api/db.sqlite3 diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0c31b4e..d9c4970 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -6,7 +6,6 @@ stages: cache: key: one-key-to-rule-them-all paths: - - emtest/target - venv test: diff --git a/Makefile b/Makefile index 1b85500..8cd5993 100644 --- a/Makefile +++ b/Makefile @@ -90,7 +90,6 @@ deploy-roi-worker: kubectl --kubeconfig deploy/kubeconfig.emblem-s1 rollout status --timeout=1h deploy roi-worker test: FORCE - cd emtest && cargo test -- --nocapture cd api; ./manage.py migrate && ./manage.py test tests OPENCV_TAG := 4.9.0 diff --git a/emtest/Cargo.lock b/emtest/Cargo.lock deleted file mode 100644 index 0070de1..0000000 --- a/emtest/Cargo.lock +++ /dev/null @@ -1,16 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "anyhow" -version = "1.0.83" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "25bdb32cbbdce2b519a9cd7df3a678443100e265d5e25ca763b7572a5104f5f3" - -[[package]] -name = "emtest" -version = "0.1.0" -dependencies = [ - "anyhow", -] diff --git a/emtest/Cargo.toml b/emtest/Cargo.toml deleted file mode 100644 index c7613cd..0000000 --- a/emtest/Cargo.toml +++ /dev/null @@ -1,9 +0,0 @@ -[package] -name = "emtest" -version = "0.1.0" -edition = "2021" - -# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html - -[dependencies] -anyhow = "1.0.83" diff --git a/emtest/src/main.rs b/emtest/src/main.rs deleted file mode 100644 index 268e6f4..0000000 --- a/emtest/src/main.rs +++ /dev/null @@ -1,46 +0,0 @@ -use anyhow::*; -use std::fs; -use std::process::Command; - -fn main() { - println!("Hello, world!"); -} - -fn abspath(f: &str) -> String { - fs::canonicalize(f) - .unwrap() - .to_str() - .unwrap() - .to_string() -} - -fn do_qrtool_test(cmd: &str, f: &str) -> Result<()> { - if f.ends_with(".DS_Store") { - return Ok(()); - } - let qrtool = abspath("../alg/qrtool"); - let out = Command::new(&qrtool) - .arg(cmd) - .arg(f) - .current_dir("../alg") - .output()?; - if out.status.code().context("code")? != 0 { - println!("{qrtool} {cmd} {f}"); - bail!("cmd failed"); - } - Ok(()) -} - -fn list_files(p: &str) -> Vec { - let mut ret = Vec::new(); - let paths = fs::read_dir(p).unwrap(); - for path in paths { - let ap = abspath(&path.unwrap().path().display().to_string()); - let md = fs::metadata(&ap).unwrap(); - if md.file_type().is_dir() { - continue; - } - ret.push(ap); - } - ret -} \ No newline at end of file