drop emtest

This commit is contained in:
Fam Zheng 2025-04-25 08:20:41 +01:00
parent cec6f1c534
commit cdb29bbc57
6 changed files with 0 additions and 74 deletions

1
.gitignore vendored
View File

@ -2,7 +2,6 @@ build
/venv
/api/static/
/opencv
/emtest/target
/dataset/local
/detection/model
/api/db.sqlite3

View File

@ -6,7 +6,6 @@ stages:
cache:
key: one-key-to-rule-them-all
paths:
- emtest/target
- venv
test:

View File

@ -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

16
emtest/Cargo.lock generated
View File

@ -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",
]

View File

@ -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"

View File

@ -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<String> {
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
}