File tree 5 files changed +47
-0
lines changed
tests/boards/altera_max10/sysid
5 files changed +47
-0
lines changed Original file line number Diff line number Diff line change
1
+ include ($ENV{ZEPHYR_BASE} /cmake/app/boilerplate.cmake NO_POLICY_SCOPE)
2
+ project (NONE)
3
+
4
+ FILE (GLOB app_sources src/*.c)
5
+ target_sources (app PRIVATE ${app_sources} )
Original file line number Diff line number Diff line change
1
+ Build test for:
2
+ Altera Nios-II System ID soft IP core.
Original file line number Diff line number Diff line change
1
+ CONFIG_ALTERA_AVALON_SYSID=y
2
+ CONFIG_ZTEST=y
Original file line number Diff line number Diff line change
1
+ /*
2
+ * Copyright (c) 2017 Intel Corporation
3
+ *
4
+ * SPDX-License-Identifier: Apache-2.0
5
+ */
6
+
7
+ #include <zephyr.h>
8
+ #include <ztest.h>
9
+
10
+ #include "altera_avalon_sysid.h"
11
+
12
+ void testing_sysid (void )
13
+ {
14
+ s32_t sysid , status = TC_FAIL ;
15
+
16
+ sysid = alt_avalon_sysid_test ();
17
+ if (!sysid ) {
18
+ status = TC_PASS ;
19
+ TC_PRINT ("[SysID] hardware and software appear to be in sync\n" );
20
+ } else if (sysid > 0 ) {
21
+ TC_PRINT ("[SysID] software appears to be older than hardware\n" );
22
+ } else {
23
+ TC_PRINT ("[SysID] hardware appears to be older than software\n" );
24
+ }
25
+
26
+ zassert_equal (status , TC_PASS , "SysID test failed" );
27
+ }
28
+
29
+ void test_main (void )
30
+ {
31
+ ztest_test_suite (nios2_sysid_test_suite ,
32
+ ztest_unit_test (testing_sysid ));
33
+ ztest_run_test_suite (nios2_sysid_test_suite );
34
+ }
Original file line number Diff line number Diff line change
1
+ tests :
2
+ test :
3
+ platform_whitelist : altera_max10
4
+ tags : sysid
You can’t perform that action at this time.
0 commit comments