From 47f09225b07c33c7657ded5bbe4c7e4f98eb9e30 Mon Sep 17 00:00:00 2001 From: JP Appel Date: Fri, 26 Jul 2024 22:23:17 -0400 Subject: FEAT: test can now time out Tests now have an extra field `max_time_ms` which is the max duration before it's process gets killed. A time of 0 ms is used to disable eztester managed timeouts, however a test can still return a timeout status which will be handled similarily. --- README.md | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index bf88697..f89c277 100644 --- a/README.md +++ b/README.md @@ -77,12 +77,12 @@ int main(int argc, char* argv[]){ eztester_list *tests = ezterster_create_list(2); // runners that always return the same status are provided - eztester_register(tests, (eztester_test){eztester_always_pass, "Always Pass"}); - eztester_register(tests, (eztester_test){sample_test, "Sample Test"}); // our test, can be defined in a different translation unit + eztester_register(tests, (eztester_test){eztester_always_pass, "Always Pass", 0}); + eztester_register(tests, (eztester_test){sample_test, "Sample Test", 0}); // our test, can be defined in a different translation unit // a list will resize on register when it doesn't have capacity - eztester_register(tests, (eztester_test){eztester_always_fail, "Always Fail"}); - eztester_register(tests, (eztester_test){eztester_always_warn, "Always Warn"}); + eztester_register(tests, (eztester_test){eztester_always_fail, "Always Fail", 0}); + eztester_register(tests, (eztester_test){eztester_always_warn, "Always Warn", 0}); eztester_register(tests, (eztester_test){sample_shell_test, "Check a non existent url"); @@ -95,6 +95,8 @@ int main(int argc, char* argv[]){ +More programs are provided in [examples](examples/). + ### Static After building, copy the static libraries into your project -- cgit v1.2.3