aboutsummaryrefslogtreecommitdiff
path: root/02-usart/test_harness/test_harness.h
diff options
context:
space:
mode:
authorJosh Rahm <joshuarahm@gmail.com>2020-11-23 19:24:15 -0700
committerJosh Rahm <joshuarahm@gmail.com>2020-11-23 19:24:15 -0700
commit2a6ae24ba769892993ec7a173c564f59feb06495 (patch)
treeba08a86b4423dd013a047719f6352fcbdb218478 /02-usart/test_harness/test_harness.h
parentca6957820c5dd156e313161b75f37afc85a57b1d (diff)
downloadstm32l4-2a6ae24ba769892993ec7a173c564f59feb06495.tar.gz
stm32l4-2a6ae24ba769892993ec7a173c564f59feb06495.tar.bz2
stm32l4-2a6ae24ba769892993ec7a173c564f59feb06495.zip
Update the testing harness to insulate tests in --nofork mode.
Before, when running a test binary in --nofork mode, it was up to the test to reset the program state before exiting to avoid dependencies on other tests. Now after each test the test harness will: 1. Wipeout the fake environmennt. 2. Reset the data segment to its initialization state. This achieves reasonable insulation between tests even though certain things (like a segfault) are stil not practical to completely insulate without fork()'ing.
Diffstat (limited to '02-usart/test_harness/test_harness.h')
-rw-r--r--02-usart/test_harness/test_harness.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/02-usart/test_harness/test_harness.h b/02-usart/test_harness/test_harness.h
index b236cba..698e2da 100644
--- a/02-usart/test_harness/test_harness.h
+++ b/02-usart/test_harness/test_harness.h
@@ -95,4 +95,7 @@ void test_printuc(size_t sz, unsigned char v1, unsigned char v2);
void test_harness_abort(int ec);
+
+void wipeout_fake_env();
+
#endif