aboutsummaryrefslogtreecommitdiff
path: root/stm32/unittest/scripts/tst_ldpc_dec_setup
diff options
context:
space:
mode:
Diffstat (limited to 'stm32/unittest/scripts/tst_ldpc_dec_setup')
-rwxr-xr-xstm32/unittest/scripts/tst_ldpc_dec_setup50
1 files changed, 50 insertions, 0 deletions
diff --git a/stm32/unittest/scripts/tst_ldpc_dec_setup b/stm32/unittest/scripts/tst_ldpc_dec_setup
new file mode 100755
index 0000000..5370f55
--- /dev/null
+++ b/stm32/unittest/scripts/tst_ldpc_dec_setup
@@ -0,0 +1,50 @@
+#!/bin/bash
+#
+# tst_ldpc_dec_setup
+#
+# Setup input and reference data for one of several versions of this test.
+
+# Find the scripts directory
+SCRIPTS="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null && pwd )"
+
+# Setup common variables
+source $SCRIPTS/run_tests_common.sh
+
+# RUN_DIR - Directory where test will be run
+RUN_DIR="${UNITTEST_BASE}/test_run/${FULL_TEST_NAME}"
+
+# Call common setup function to make the directory
+setup_common "${RUN_DIR}"
+
+# Change to test directory
+cd "${RUN_DIR}"
+
+
+#####################################################################
+## Test SETUP actions:
+
+case "${TEST_OPT}" in
+
+ ideal )
+# # Config is <unused>, <unused>, <ldpc_en>, <unused> <profile>
+# echo "00000000" > stm_cfg.txt
+ ldpc_enc /dev/zero stm_in.raw --sd --code HRA_112_112 --testframes 6 \
+ > setup.log 2>&1
+ ldpc_dec stm_in.raw ref_out.raw --sd --code HRA_112_112 --testframes \
+ > ref_gen.log 2>&1
+ ;;
+
+ noise )
+# # Config is <unused>, <unused>, <ldpc_en>, <unused> <profile>
+# echo "00000000" > stm_cfg.txt
+ ldpc_enc /dev/zero enc_out.raw --sd --code HRA_112_112 --testframes 24 \
+ > setup.log 2>&1
+ ldpc_noise enc_out.raw stm_in.raw 1 \
+ >> setup.log 2>&1
+ ldpc_dec stm_in.raw ref_out.raw --sd --code HRA_112_112 --testframes \
+ > ref_gen.log 2>&1
+ ;;
+
+ esac
+
+exit 0