[ottf] Update autogen test templates
Signed-off-by: Alphan Ulusoy <alphan@google.com>
diff --git a/sw/device/tests/autogen/alert_test.c b/sw/device/tests/autogen/alert_test.c
index 8504866..41e0c5c 100644
--- a/sw/device/tests/autogen/alert_test.c
+++ b/sw/device/tests/autogen/alert_test.c
@@ -41,12 +41,15 @@
#include "sw/device/lib/dif/dif_uart.h"
#include "sw/device/lib/dif/dif_usbdev.h"
#include "sw/device/lib/testing/alert_handler_testutils.h"
-#include "sw/device/lib/testing/test_framework/check.h"
#include "sw/device/lib/testing/test_framework/FreeRTOSConfig.h"
+#include "sw/device/lib/testing/test_framework/check.h"
+#include "sw/device/lib/testing/test_framework/ottf_test_config.h"
#include "alert_handler_regs.h" // Generated.
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
+OTTF_DEFINE_TEST_CONFIG();
+
static dif_alert_handler_t alert_handler;
static dif_adc_ctrl_t adc_ctrl_aon;
static dif_aes_t aes;
diff --git a/sw/device/tests/autogen/plic_all_irqs_test.c b/sw/device/tests/autogen/plic_all_irqs_test.c
index d211fbb..f160fd4 100644
--- a/sw/device/tests/autogen/plic_all_irqs_test.c
+++ b/sw/device/tests/autogen/plic_all_irqs_test.c
@@ -1424,7 +1424,7 @@
}
}
-const test_config_t kTestConfig;
+OTTF_DEFINE_TEST_CONFIG();
bool test_main(void) {
irq_global_ctrl(true);
diff --git a/util/topgen/templates/alert_test.c.tpl b/util/topgen/templates/alert_test.c.tpl
index a4acac8..e485d09 100644
--- a/util/topgen/templates/alert_test.c.tpl
+++ b/util/topgen/templates/alert_test.c.tpl
@@ -12,12 +12,15 @@
#include "sw/device/lib/dif/dif_${n}.h"
% endfor
#include "sw/device/lib/testing/alert_handler_testutils.h"
-#include "sw/device/lib/testing/test_framework/check.h"
#include "sw/device/lib/testing/test_framework/FreeRTOSConfig.h"
+#include "sw/device/lib/testing/test_framework/check.h"
+#include "sw/device/lib/testing/test_framework/ottf_test_config.h"
#include "alert_handler_regs.h" // Generated.
#include "hw/top_earlgrey/sw/autogen/top_earlgrey.h"
+OTTF_DEFINE_TEST_CONFIG();
+
static dif_alert_handler_t alert_handler;
% for p in helper.alert_peripherals:
static dif_${p.name}_t ${p.inst_name};
diff --git a/util/topgen/templates/plic_all_irqs_test.c.tpl b/util/topgen/templates/plic_all_irqs_test.c.tpl
index 53e592f..262683a 100644
--- a/util/topgen/templates/plic_all_irqs_test.c.tpl
+++ b/util/topgen/templates/plic_all_irqs_test.c.tpl
@@ -206,7 +206,7 @@
% endfor
}
-const test_config_t kTestConfig;
+OTTF_DEFINE_TEST_CONFIG();
bool test_main(void) {
irq_global_ctrl(true);