Skip to content

Commit

Permalink
Remove auxiliary functions from tests
Browse files Browse the repository at this point in the history
Remove auxilary functions from tests, as the current test set is
meant to cover only the core commands. The removed functions will
be part of the libary API which should be covered by a separate
test set.

Signed-off-by: Michalis Pappas <mpappas@fastmail.fm>
  • Loading branch information
michpappas authored and jbech-linaro committed May 7, 2018
1 parent 51f0863 commit 2dba308
Showing 1 changed file with 0 additions and 41 deletions.
41 changes: 0 additions & 41 deletions atsha204a/tests/tests.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,22 +39,6 @@ int main(int argc, char *argv[])
while (!cmd_wake(ioif)) {};
printf("ATSHA204A is awake\n");

#ifdef PERSONALIZE
printf("\n - Personalize -\n");
ret = atsha204a_personalize(ioif);
if (ret != STATUS_OK) {
printf("Failed to personalize the device\n");
}

printf("\n - Update Extra -\n");
ret = cmd_update_extra(ioif, 0, 0xff);
if (ret != STATUS_OK) {
printf("Failed to personalize the device\n");
}

goto out;
#endif

printf("\n - Random -\n");
ret = cmd_get_random(ioif, buf, RANDOM_LEN);
CHECK_RES("random", ret, buf, RANDOM_LEN);
Expand All @@ -63,31 +47,6 @@ int main(int argc, char *argv[])
ret = cmd_get_devrev(ioif, buf, DEVREV_LEN);
CHECK_RES("devrev", ret, buf, DEVREV_LEN);

printf("\n - Serial number -\n");
ret = cmd_get_serialnbr(ioif, buf, SERIALNUM_LEN);
CHECK_RES("serial number", ret, buf, SERIALNUM_LEN);

printf("\n - OTP mode -\n");
ret = cmd_get_otp_mode(ioif, buf);
CHECK_RES("otp mode", ret, buf, OTP_CONFIG_SIZE);

{
int i;
printf("\n - Slotconfig -\n");
for (i = 0; i < 16; i++) {
printf("\n");
ret = cmd_get_slot_config(ioif, i, (uint16_t*)buf);
CHECK_RES("slotconfig", ret, buf, SLOT_CONFIG_SIZE);
}
}

printf("\n - Lock Data -\n");
ret = cmd_get_lock_data(ioif, buf);
CHECK_RES("Lock Data", ret, buf, LOCK_DATA_SIZE);

printf("\n - Lock Config -\n");
ret = cmd_get_lock_config(ioif, buf);
CHECK_RES("Lock Config", ret, buf, LOCK_CONFIG_SIZE);
{
uint8_t in_short[NONCE_SHORT_NUMIN] = {
0x00, 0x01, 0x02, 0x03,
Expand Down

0 comments on commit 2dba308

Please sign in to comment.