Files
pysim-local/tests/pySim-shell_test/ara_m/test.script
Philipp Maier f87a00c04f Add testsuite for pySim-shell with real cards
This patch adds a comprehensive testsuite for pySim-shell. The testsuite
is based on python's unittest framework in combination with pySim-shell
scripts.

Related: OS#6531
Change-Id: Ieae1330767a6e55e62437f5f988a0d33b727b5de
2024-09-20 17:53:27 +02:00

32 lines
1.3 KiB
Plaintext

set debug true
set echo true
# Export existing ARA-M configuration
export --filename ADF.ARA-M > restore_adf_ara_m.script.tmp
# Create a known config in ADF.ARA-M
select ADF.ARA-M
aram_delete_all
aram_store_ref_ar_do --aid ffffffffffaa --device-app-id aa6872787654334567840de535c2bbd5a04f0baa --apdu-never --nfc-never --android-permissions 0000000000000004
aram_store_ref_ar_do --aid ffffffffffbb --device-app-id aa6872f28b340b2345678905d5c2bbd5a04f0bdd --apdu-always --nfc-always --android-permissions 0000000000000004
aram_store_ref_ar_do --aid ffffffffffcc --device-app-id a1234567890aaabb1f140de987657891a04f0bdd --apdu-filter aabbccdd01020304 --nfc-always --android-permissions 0000000000000004
aram_store_ref_ar_do --aid ffffffffffdd --device-app-id a1234567890123bb1f140de987aaa891bbbf0bdd --apdu-filter aabbccdd010203041122334405060708 --nfc-never --android-permissions 0000000000000004
# Export ADF.ARA-M to a temporary script file
export --filename ADF.ARA-M > adf_ara-m.script.tmp
# Ensure ADF.ARA-M is empty
aram_delete_all
# Check that ADF.ARA-M is empty
aram_get_all > adf_ara-m_empty.cfg.tmp
# Run the temporary script file to restore ADF.ARA-M again
run_script adf_ara-m.script.tmp
# Read out ADF.ARA-M using aram_get_all
aram_get_all > adf_ara-m.cfg.tmp
# Restore ARA-M configuration to its original state
run_script restore_adf_ara_m.script.tmp