execute only one testcase per default

This commit is contained in:
Steffen Jaeckel 2014-08-06 01:15:58 +02:00
parent 92274aafb5
commit 2c69088be8

View File

@ -114,8 +114,12 @@ class Example(object):
def __str__(self): def __str__(self):
res = "{{\n \"{0}\",\n{1},\n{{".format(self.name, str(self.key)) res = "{{\n \"{0}\",\n{1},\n{{".format(self.name, str(self.key))
for i in self.data: for idx, d in enumerate(self.data, 1):
res += str(i) + '\n' if idx == 2:
res += '#ifdef LTC_TEST_EXT\n'
res += str(d) + '\n'
if idx == ftype.numcases:
res += '#endif /* LTC_TEST_EXT */\n'
res += '}\n},' res += '}\n},'
return res return res
@ -225,7 +229,11 @@ print('''} rsaData_t;
typedef struct testcase { typedef struct testcase {
const char* name; const char* name;
rsaKey_t rsa; rsaKey_t rsa;
#ifdef LTC_TEST_EXT
rsaData_t data[%d]; rsaData_t data[%d];
#else
rsaData_t data[1];
#endif /* LTC_TEST_EXT */
} testcase_t; } testcase_t;
testcase_t testcases_%s[] = testcase_t testcases_%s[] =