Ported tests to new framework

This mostly required names for each test case, declarations of
previously-implicit variables since the new test framework is more
conservative with what it declares (the small extra effort to add
declarations is well worth the simplicity and improved readability),
and tweaks to work with not-really-constant defines.

Also renamed test_ -> test, replacing the old ./scripts/test.py,
unfortunately git seems to have had a hard time with this.
This commit is contained in:
Christopher Haster
2022-05-14 02:55:17 -05:00
parent d679fbb389
commit 0781f50edb
21 changed files with 2538 additions and 2818 deletions
+3 -3
View File
@@ -19,7 +19,7 @@ struct test_case {
test_types_t types;
size_t permutations;
uintmax_t (*const *const *defines)(void);
intmax_t (*const *const *defines)(void);
bool (*filter)(void);
void (*run)(struct lfs_config *cfg);
@@ -43,8 +43,8 @@ extern const size_t test_suite_count;
// access generated test defines
uintmax_t test_predefine(size_t define);
uintmax_t test_define(size_t define);
intmax_t test_predefine(size_t define);
intmax_t test_define(size_t define);
// a few preconfigured defines that control how tests run
#define READ_SIZE test_predefine(0)