From 770eaee23913f86f216d3880d3fc8b2ec267ebd6 Mon Sep 17 00:00:00 2001 From: Sean McBride Date: Thu, 22 Apr 2021 14:05:37 +0000 Subject: [PATCH] test: Add first EKF test --- .github/workflows/main.yaml | 8 ++++++++ test.sh | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 51ac094..862621a 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -123,3 +123,11 @@ jobs: - name: OCR by DPI run: | ./test.sh ocr_by_dpi + - name: Cache EKF + uses: actions/cache@v2 + with: + path: ./runtime/bin/ekf_wasm.so + key: ${{ runner.os }}-gocr2-${{ hashFiles('./runtime/tests/TinyEKF') }} + - name: EKF by Iteration + run: | + ./test.sh ekf_by_iteration diff --git a/test.sh b/test.sh index ba57136..73c91d9 100755 --- a/test.sh +++ b/test.sh @@ -96,15 +96,20 @@ ocr_by_dpi() { # EKF Tests ekf_by_iteration() { + if [[ ! -f "$base_dir/runtime/bin/ekf_wasm.so" ]]; then + make tinyekf -C "$base_dir/runtime/tests" || exit 1 + fi make tinyekf -C "$base_dir/runtime/tests" || exit 1 pushd "$base_dir/runtime/experiments/applications/ekf/by_iteration" || exit 1 - ./run.sh || failed_tests+=("ocr_by_dpi") + ./run.sh || failed_tests+=("ekf_by_iteration") popd || exit 1 return 0 } ekf_one_iteration() { - make tinyekf -C "$base_dir/runtime/tests" || exit 1 + if [[ ! -f "$base_dir/runtime/bin/ekf_wasm.so" ]]; then + make tinyekf -C "$base_dir/runtime/tests" || exit 1 + fi pushd "$base_dir/runtime/experiments/applications/ekf/one_iteration" || exit 1 ./run.sh || failed_tests+=("ekf_one_iteration") popd || exit 1