tests: build on non-ELF platforms

Signed-off-by: Weijia Wang <contact@weijia.wang>
This commit is contained in:
Weijia Wang 2023-03-22 12:09:47 +02:00
parent 002e1f1d3a
commit addd8fbcb9
3 changed files with 22 additions and 2 deletions

View file

@ -63,7 +63,12 @@ static int timeouts_enabled = 1;
/* set to one if the output goes to the terminal */
static int is_atty = 0;
#ifdef __APPLE__
extern const struct test __start_test_section __asm("section$start$__RODATA$test_section");
extern const struct test __stop_test_section __asm("section$end$__RODATA$test_section");
#else
extern const struct test __start_test_section, __stop_test_section;
#endif
static const struct test *
find_test(const char *name)