1# 2# Copyright (c) 2020, The OpenThread Authors. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms, with or without 6# modification, are permitted provided that the following conditions are met: 7# 1. Redistributions of source code must retain the above copyright 8# notice, this list of conditions and the following disclaimer. 9# 2. Redistributions in binary form must reproduce the above copyright 10# notice, this list of conditions and the following disclaimer in the 11# documentation and/or other materials provided with the distribution. 12# 3. Neither the name of the copyright holder nor the 13# names of its contributors may be used to endorse or promote products 14# derived from this software without specific prior written permission. 15# 16# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 17# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE 20# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 21# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 22# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 23# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 24# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 25# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 26# POSSIBILITY OF SUCH DAMAGE. 27# 28 29set(COMMON_INCLUDES 30 ${PROJECT_SOURCE_DIR}/include 31 ${PROJECT_SOURCE_DIR}/src 32 ${PROJECT_SOURCE_DIR}/src/core 33) 34 35set(COMMON_INCLUDES_RCP 36 ${COMMON_INCLUDES} 37 ${PROJECT_SOURCE_DIR}/src/core/radio 38) 39 40set(COMMON_COMPILE_OPTIONS 41 -DOPENTHREAD_FTD=1 42 -DOPENTHREAD_MTD=0 43 -DOPENTHREAD_RADIO=0 44 -DOPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=1 45) 46 47set(COMMON_COMPILE_OPTIONS_RCP 48 -DOPENTHREAD_FTD=0 49 -DOPENTHREAD_MTD=0 50 -DOPENTHREAD_RADIO=1 51 -DOPENTHREAD_SPINEL_CONFIG_OPENTHREAD_MESSAGE_ENABLE=1 52 -DOPENTHREAD_CONFIG_PLATFORM_UDP_ENABLE=0 53) 54 55set(MULTIPAN_RCP_COMPILE_OPTIONS 56 -DOPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1 57 -DOPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE=1 58 -DOPENTHREAD_CONFIG_LOG_PREPEND_UPTIME=0 59 -DOPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE=0 # used to skip backoff and request tx from platform directly. 60 -DOPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE=1 61) 62 63add_library(ot-test-platform-ftd 64 test_platform.cpp 65 test_util.cpp 66) 67add_library(ot-test-platform-rcp 68 test_platform.cpp 69 test_util.cpp 70) 71 72target_include_directories(ot-test-platform-ftd 73 PRIVATE 74 ${COMMON_INCLUDES} 75) 76 77target_include_directories(ot-test-platform-rcp 78 PRIVATE 79 ${COMMON_INCLUDES} 80) 81 82target_compile_options(ot-test-platform-ftd 83 PRIVATE 84 ${COMMON_COMPILE_OPTIONS} 85) 86 87target_compile_options(ot-test-platform-rcp 88 PRIVATE 89 ${COMMON_COMPILE_OPTIONS_RCP} 90) 91 92if(OT_MULTIPAN_RCP) 93 target_compile_options(ot-test-platform-rcp 94 PRIVATE 95 "-DOPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE=1" 96 "-DOPENTHREAD_CONFIG_MULTIPLE_STATIC_INSTANCE_ENABLE=1" 97 "-DOPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE=1" 98 ) 99endif() 100 101target_link_libraries(ot-test-platform-ftd 102 PRIVATE 103 ot-config 104 ${OT_MBEDTLS} 105) 106 107target_link_libraries(ot-test-platform-rcp 108 PRIVATE 109 ot-config 110 ${OT_MBEDTLS} 111) 112 113set(COMMON_LIBS 114 openthread-spinel-ncp 115 openthread-hdlc 116 ot-test-platform-ftd 117 openthread-ftd 118 ot-test-platform-ftd 119 ${OT_MBEDTLS} 120 ot-config 121 openthread-ftd 122) 123 124set(COMMON_LIBS_RCP 125 ot-test-platform-rcp 126 openthread-rcp 127 ${OT_MBEDTLS} 128 ot-config 129) 130 131add_executable(ot-test-aes 132 test_aes.cpp 133) 134 135target_include_directories(ot-test-aes 136 PRIVATE 137 ${COMMON_INCLUDES} 138) 139 140target_compile_options(ot-test-aes 141 PRIVATE 142 ${COMMON_COMPILE_OPTIONS} 143) 144 145target_link_libraries(ot-test-aes 146 PRIVATE 147 ${COMMON_LIBS} 148) 149 150add_test(NAME ot-test-aes COMMAND ot-test-aes) 151 152add_executable(ot-test-array 153 test_array.cpp 154) 155 156target_include_directories(ot-test-array 157 PRIVATE 158 ${COMMON_INCLUDES} 159) 160 161target_compile_options(ot-test-array 162 PRIVATE 163 ${COMMON_COMPILE_OPTIONS} 164) 165 166target_link_libraries(ot-test-array 167 PRIVATE 168 ${COMMON_LIBS} 169) 170 171add_executable(ot-test-binary-search 172 test_binary_search.cpp 173) 174 175target_include_directories(ot-test-binary-search 176 PRIVATE 177 ${COMMON_INCLUDES} 178) 179 180target_compile_options(ot-test-binary-search 181 PRIVATE 182 ${COMMON_COMPILE_OPTIONS} 183) 184 185target_link_libraries(ot-test-binary-search 186 PRIVATE 187 ${COMMON_LIBS} 188) 189 190add_test(NAME ot-test-binary-search COMMAND ot-test-binary-search) 191 192add_executable(ot-test-child 193 test_child.cpp 194) 195 196add_executable(ot-test-checksum 197 test_checksum.cpp 198) 199 200target_include_directories(ot-test-checksum 201 PRIVATE 202 ${COMMON_INCLUDES} 203) 204 205target_compile_options(ot-test-checksum 206 PRIVATE 207 ${COMMON_COMPILE_OPTIONS} 208) 209 210target_link_libraries(ot-test-checksum 211 PRIVATE 212 ${COMMON_LIBS} 213) 214 215add_test(NAME ot-test-checksum COMMAND ot-test-checksum) 216 217 218target_include_directories(ot-test-child 219 PRIVATE 220 ${COMMON_INCLUDES} 221) 222 223target_compile_options(ot-test-child 224 PRIVATE 225 ${COMMON_COMPILE_OPTIONS} 226) 227 228target_link_libraries(ot-test-child 229 PRIVATE 230 ${COMMON_LIBS} 231) 232 233add_test(NAME ot-test-child COMMAND ot-test-child) 234 235add_executable(ot-test-child-table 236 test_child_table.cpp 237) 238 239target_include_directories(ot-test-child-table 240 PRIVATE 241 ${COMMON_INCLUDES} 242) 243 244target_compile_options(ot-test-child-table 245 PRIVATE 246 ${COMMON_COMPILE_OPTIONS} 247) 248 249target_link_libraries(ot-test-child-table 250 PRIVATE 251 ${COMMON_LIBS} 252) 253 254add_test(NAME ot-test-child-table COMMAND ot-test-child-table) 255 256add_executable(ot-test-cmd-line-parser 257 test_cmd_line_parser.cpp 258) 259 260target_include_directories(ot-test-cmd-line-parser 261 PRIVATE 262 ${COMMON_INCLUDES} 263) 264 265target_compile_options(ot-test-cmd-line-parser 266 PRIVATE 267 ${COMMON_COMPILE_OPTIONS} 268) 269 270target_link_libraries(ot-test-cmd-line-parser 271 PRIVATE 272 ${COMMON_LIBS} 273) 274 275add_test(NAME ot-test-cmd-line-parser COMMAND ot-test-cmd-line-parser) 276 277add_executable(ot-test-data 278 test_data.cpp 279) 280 281target_include_directories(ot-test-data 282 PRIVATE 283 ${COMMON_INCLUDES} 284) 285 286target_compile_options(ot-test-data 287 PRIVATE 288 ${COMMON_COMPILE_OPTIONS} 289) 290 291target_link_libraries(ot-test-data 292 PRIVATE 293 ${COMMON_LIBS} 294) 295 296add_test(NAME ot-test-data COMMAND ot-test-data) 297 298add_executable(ot-test-dns 299 test_dns.cpp 300) 301 302target_include_directories(ot-test-dns 303 PRIVATE 304 ${COMMON_INCLUDES} 305) 306 307target_compile_options(ot-test-dns 308 PRIVATE 309 ${COMMON_COMPILE_OPTIONS} 310) 311 312target_link_libraries(ot-test-dns 313 PRIVATE 314 ${COMMON_LIBS} 315) 316 317add_test(NAME ot-test-dns COMMAND ot-test-dns) 318 319add_executable(ot-test-dns-client 320 test_dns_client.cpp 321) 322 323target_include_directories(ot-test-dns-client 324 PRIVATE 325 ${COMMON_INCLUDES} 326) 327 328target_compile_options(ot-test-dns-client 329 PRIVATE 330 ${COMMON_COMPILE_OPTIONS} 331) 332 333target_link_libraries(ot-test-dns-client 334 PRIVATE 335 ${COMMON_LIBS} 336) 337 338add_test(NAME ot-test-dns-client COMMAND ot-test-dns-client) 339 340add_executable(ot-test-dso 341 test_dso.cpp 342) 343 344target_include_directories(ot-test-dso 345 PRIVATE 346 ${COMMON_INCLUDES} 347) 348 349target_compile_options(ot-test-dso 350 PRIVATE 351 ${COMMON_COMPILE_OPTIONS} 352) 353 354target_link_libraries(ot-test-dso 355 PRIVATE 356 ${COMMON_LIBS} 357) 358 359add_test(NAME ot-test-dso COMMAND ot-test-dso) 360 361 362add_executable(ot-test-ecdsa 363 test_ecdsa.cpp 364) 365 366target_include_directories(ot-test-ecdsa 367 PRIVATE 368 ${COMMON_INCLUDES} 369) 370 371target_compile_options(ot-test-ecdsa 372 PRIVATE 373 ${COMMON_COMPILE_OPTIONS} 374) 375 376target_link_libraries(ot-test-ecdsa 377 PRIVATE 378 ${COMMON_LIBS} 379) 380 381add_test(NAME ot-test-ecdsa COMMAND ot-test-ecdsa) 382 383 384add_executable(ot-test-flash 385 test_flash.cpp 386) 387 388target_include_directories(ot-test-flash 389 PRIVATE 390 ${COMMON_INCLUDES} 391) 392 393target_compile_options(ot-test-flash 394 PRIVATE 395 ${COMMON_COMPILE_OPTIONS} 396) 397 398target_link_libraries(ot-test-flash 399 PRIVATE 400 ${COMMON_LIBS} 401) 402 403add_test(NAME ot-test-flash COMMAND ot-test-flash) 404 405add_executable(ot-test-frame-builder 406 test_frame_builder.cpp 407) 408 409target_include_directories(ot-test-frame-builder 410 PRIVATE 411 ${COMMON_INCLUDES} 412) 413 414target_compile_options(ot-test-frame-builder 415 PRIVATE 416 ${COMMON_COMPILE_OPTIONS} 417) 418 419target_link_libraries(ot-test-frame-builder 420 PRIVATE 421 ${COMMON_LIBS} 422) 423 424add_test(NAME ot-test-frame_builder COMMAND ot-test-frame-builder) 425 426add_executable(ot-test-heap 427 test_heap.cpp 428) 429 430target_include_directories(ot-test-heap 431 PRIVATE 432 ${COMMON_INCLUDES} 433) 434 435target_compile_options(ot-test-heap 436 PRIVATE 437 ${COMMON_COMPILE_OPTIONS} 438) 439 440target_link_libraries(ot-test-heap 441 PRIVATE 442 ${COMMON_LIBS} 443) 444 445add_test(NAME ot-test-heap COMMAND ot-test-heap) 446 447add_executable(ot-test-heap-array 448 test_heap_array.cpp 449) 450 451target_include_directories(ot-test-heap-array 452 PRIVATE 453 ${COMMON_INCLUDES} 454) 455 456target_compile_options(ot-test-heap-array 457 PRIVATE 458 ${COMMON_COMPILE_OPTIONS} 459) 460 461target_link_libraries(ot-test-heap-array 462 PRIVATE 463 ${COMMON_LIBS} 464) 465 466add_test(NAME ot-test-heap-array COMMAND ot-test-heap-array) 467 468add_executable(ot-test-heap-string 469 test_heap_string.cpp 470) 471 472target_include_directories(ot-test-heap-string 473 PRIVATE 474 ${COMMON_INCLUDES} 475) 476 477target_compile_options(ot-test-heap-string 478 PRIVATE 479 ${COMMON_COMPILE_OPTIONS} 480) 481 482target_link_libraries(ot-test-heap-string 483 PRIVATE 484 ${COMMON_LIBS} 485) 486 487add_test(NAME ot-test-heap-string COMMAND ot-test-heap-string) 488 489add_executable(ot-test-hkdf-sha256 490 ${COMMON_SOURCES} 491 test_hkdf_sha256.cpp 492) 493 494target_include_directories(ot-test-hkdf-sha256 495 PRIVATE 496 ${COMMON_INCLUDES} 497) 498 499target_compile_definitions(ot-test-hkdf-sha256 500 PRIVATE 501 ${OT_PRIVATE_DEFINES} 502) 503 504target_compile_options(ot-test-hkdf-sha256 505 PRIVATE 506 ${COMMON_COMPILE_OPTIONS} 507) 508 509target_link_libraries(ot-test-hkdf-sha256 510 PRIVATE 511 ${COMMON_LIBS} 512) 513 514add_test(NAME ot-test-hkdf-sha256 COMMAND ot-test-hkdf-sha256) 515 516add_executable(ot-test-hmac-sha256 517 test_hmac_sha256.cpp 518) 519 520target_include_directories(ot-test-hmac-sha256 521 PRIVATE 522 ${COMMON_INCLUDES} 523) 524 525target_compile_options(ot-test-hmac-sha256 526 PRIVATE 527 ${COMMON_COMPILE_OPTIONS} 528) 529 530target_link_libraries(ot-test-hmac-sha256 531 PRIVATE 532 ${COMMON_LIBS} 533) 534 535add_test(NAME ot-test-hmac-sha256 COMMAND ot-test-hmac-sha256) 536 537add_executable(ot-test-ip4-header 538 test_ip4_header.cpp 539) 540 541target_include_directories(ot-test-ip4-header 542 PRIVATE 543 ${COMMON_INCLUDES} 544) 545 546target_compile_options(ot-test-ip4-header 547 PRIVATE 548 ${COMMON_COMPILE_OPTIONS} 549) 550 551target_link_libraries(ot-test-ip4-header 552 PRIVATE 553 ${COMMON_LIBS} 554) 555 556add_test(NAME ot-test-ip4-header COMMAND ot-test-ip4-header) 557 558add_executable(ot-test-ip6-header 559 test_ip6_header.cpp 560) 561 562target_include_directories(ot-test-ip6-header 563 PRIVATE 564 ${COMMON_INCLUDES} 565) 566 567target_compile_options(ot-test-ip6-header 568 PRIVATE 569 ${COMMON_COMPILE_OPTIONS} 570) 571 572target_link_libraries(ot-test-ip6-header 573 PRIVATE 574 ${COMMON_LIBS} 575) 576 577add_test(NAME ot-test-ip6-header COMMAND ot-test-ip6-header) 578 579add_executable(ot-test-ip-address 580 test_ip_address.cpp 581) 582 583target_include_directories(ot-test-ip-address 584 PRIVATE 585 ${COMMON_INCLUDES} 586) 587 588target_compile_options(ot-test-ip-address 589 PRIVATE 590 ${COMMON_COMPILE_OPTIONS} 591) 592 593target_link_libraries(ot-test-ip-address 594 PRIVATE 595 ${COMMON_LIBS} 596) 597 598add_test(NAME ot-test-ip-address COMMAND ot-test-ip-address) 599 600add_executable(ot-test-link-metrics-manager 601 test_link_metrics_manager.cpp 602) 603 604target_include_directories(ot-test-link-metrics-manager 605 PRIVATE 606 ${COMMON_INCLUDES} 607) 608 609target_compile_options(ot-test-link-metrics-manager 610 PRIVATE 611 ${COMMON_COMPILE_OPTIONS} 612) 613 614target_link_libraries(ot-test-link-metrics-manager 615 PRIVATE 616 ${COMMON_LIBS} 617) 618 619add_test(NAME ot-test-link-metrics-manager COMMAND ot-test-link-metrics-manager) 620 621add_executable(ot-test-link-quality 622 test_link_quality.cpp 623) 624 625target_include_directories(ot-test-link-quality 626 PRIVATE 627 ${COMMON_INCLUDES} 628) 629 630target_compile_options(ot-test-link-quality 631 PRIVATE 632 ${COMMON_COMPILE_OPTIONS} 633) 634 635target_link_libraries(ot-test-link-quality 636 PRIVATE 637 ${COMMON_LIBS} 638) 639 640add_test(NAME ot-test-link-quality COMMAND ot-test-link-quality) 641 642add_executable(ot-test-linked-list 643 test_linked_list.cpp 644) 645 646target_include_directories(ot-test-linked-list 647 PRIVATE 648 ${COMMON_INCLUDES} 649) 650 651target_compile_options(ot-test-linked-list 652 PRIVATE 653 ${COMMON_COMPILE_OPTIONS} 654) 655 656target_link_libraries(ot-test-linked-list 657 PRIVATE 658 ${COMMON_LIBS} 659) 660 661add_test(NAME ot-test-linked-list COMMAND ot-test-linked-list) 662 663add_executable(ot-test-lowpan 664 test_lowpan.cpp 665) 666 667target_include_directories(ot-test-lowpan 668 PRIVATE 669 ${COMMON_INCLUDES} 670) 671 672target_compile_options(ot-test-lowpan 673 PRIVATE 674 ${COMMON_COMPILE_OPTIONS} 675) 676 677target_link_libraries(ot-test-lowpan 678 PRIVATE 679 ${COMMON_LIBS} 680) 681 682add_test(NAME ot-test-lowpan COMMAND ot-test-lowpan) 683 684add_executable(ot-test-mac-frame 685 test_mac_frame.cpp 686) 687 688target_include_directories(ot-test-mac-frame 689 PRIVATE 690 ${COMMON_INCLUDES} 691) 692 693target_compile_options(ot-test-mac-frame 694 PRIVATE 695 ${COMMON_COMPILE_OPTIONS} 696) 697 698target_link_libraries(ot-test-mac-frame 699 PRIVATE 700 ${COMMON_LIBS} 701) 702 703add_test(NAME ot-test-mac-frame COMMAND ot-test-mac-frame) 704 705add_executable(ot-test-macros 706 test_macros.cpp 707) 708 709target_include_directories(ot-test-macros 710 PRIVATE 711 ${COMMON_INCLUDES} 712) 713 714target_compile_options(ot-test-macros 715 PRIVATE 716 ${COMMON_COMPILE_OPTIONS} 717) 718 719target_link_libraries(ot-test-macros 720 PRIVATE 721 ${COMMON_LIBS} 722) 723 724add_test(NAME ot-test-macros COMMAND ot-test-macros) 725 726add_executable(ot-test-message 727 test_message.cpp 728) 729 730target_include_directories(ot-test-message 731 PRIVATE 732 ${COMMON_INCLUDES} 733) 734 735target_compile_options(ot-test-message 736 PRIVATE 737 ${COMMON_COMPILE_OPTIONS} 738) 739 740target_link_libraries(ot-test-message 741 PRIVATE 742 ${COMMON_LIBS} 743) 744 745add_test(NAME ot-test-message COMMAND ot-test-message) 746 747add_executable(ot-test-message-queue 748 test_message_queue.cpp 749) 750 751target_include_directories(ot-test-message-queue 752 PRIVATE 753 ${COMMON_INCLUDES} 754) 755 756target_compile_options(ot-test-message-queue 757 PRIVATE 758 ${COMMON_COMPILE_OPTIONS} 759) 760 761target_link_libraries(ot-test-message-queue 762 PRIVATE 763 ${COMMON_LIBS} 764) 765 766add_test(NAME ot-test-message-queue COMMAND ot-test-message-queue) 767 768add_executable(ot-test-mle 769 test_mle.cpp 770) 771 772target_include_directories(ot-test-mle 773 PRIVATE 774 ${COMMON_INCLUDES} 775) 776 777target_compile_options(ot-test-mle 778 PRIVATE 779 ${COMMON_COMPILE_OPTIONS} 780) 781 782target_link_libraries(ot-test-mle 783 PRIVATE 784 ${COMMON_LIBS} 785) 786 787add_test(NAME ot-test-mle COMMAND ot-test-mle) 788 789add_executable(ot-test-multicast-listeners-table 790 test_multicast_listeners_table.cpp 791) 792 793target_include_directories(ot-test-multicast-listeners-table 794 PRIVATE 795 ${COMMON_INCLUDES} 796) 797 798target_compile_options(ot-test-multicast-listeners-table 799 PRIVATE 800 ${COMMON_COMPILE_OPTIONS} 801) 802 803target_link_libraries(ot-test-multicast-listeners-table 804 PRIVATE 805 ${COMMON_LIBS} 806) 807 808add_test(NAME ot-test-multicast-listeners-table COMMAND ot-test-multicast-listeners-table) 809 810if(OT_MULTIPAN_RCP) 811 add_executable(ot-test-multipan-rcp-instances 812 test_multipan_rcp_instances.cpp 813 ) 814 815 target_include_directories(ot-test-multipan-rcp-instances 816 PRIVATE 817 ${COMMON_INCLUDES_RCP} 818 ) 819 820 target_compile_options(ot-test-multipan-rcp-instances 821 PRIVATE 822 ${COMMON_COMPILE_OPTIONS_RCP} 823 ${MULTIPAN_RCP_COMPILE_OPTIONS} 824 ) 825 826 target_compile_definitions(ot-test-multipan-rcp-instances 827 PRIVATE 828 "OPENTHREAD_CONFIG_MULTIPAN_RCP_ENABLE=1" 829 ) 830 831 target_compile_options(ot-config-radio 832 INTERFACE 833 "-DOPENTHREAD_CONFIG_MAC_SOFTWARE_CSMA_BACKOFF_ENABLE=0" # used to skip backoff and request tx from platform directly. 834 ) 835 836 target_link_libraries(ot-test-multipan-rcp-instances 837 PRIVATE 838 ${COMMON_LIBS_RCP} 839 ) 840 841 add_test(NAME ot-test-multipan-rcp-instances COMMAND ot-test-multipan-rcp-instances) 842 endif() 843 844add_test(NAME ot-test-nat64 COMMAND ot-test-nat64) 845 846add_executable(ot-test-nat64 847 test_nat64.cpp 848) 849 850target_include_directories(ot-test-nat64 851 PRIVATE 852 ${COMMON_INCLUDES} 853) 854 855target_compile_options(ot-test-nat64 856 PRIVATE 857 ${COMMON_COMPILE_OPTIONS} 858) 859 860target_link_libraries(ot-test-nat64 861 PRIVATE 862 ${COMMON_LIBS} 863) 864 865add_executable(ot-test-ndproxy-table 866 test_ndproxy_table.cpp 867) 868 869add_executable(ot-test-network-name 870 test_network_name.cpp 871) 872 873target_include_directories(ot-test-network-name 874 PRIVATE 875 ${COMMON_INCLUDES} 876) 877 878target_compile_options(ot-test-network-name 879 PRIVATE 880 ${COMMON_COMPILE_OPTIONS} 881) 882 883target_link_libraries(ot-test-network-name 884 PRIVATE 885 ${COMMON_LIBS} 886) 887 888add_test(NAME ot-test-network-name COMMAND ot-test-network-name) 889 890target_include_directories(ot-test-ndproxy-table 891 PRIVATE 892 ${COMMON_INCLUDES} 893) 894 895target_compile_options(ot-test-ndproxy-table 896 PRIVATE 897 ${COMMON_COMPILE_OPTIONS} 898) 899 900 901target_link_libraries(ot-test-ndproxy-table 902 PRIVATE 903 ${COMMON_LIBS} 904) 905 906add_test(NAME ot-test-ndproxy-table COMMAND ot-test-ndproxy-table) 907 908 909add_executable(ot-test-netif 910 test_netif.cpp 911) 912 913target_include_directories(ot-test-netif 914 PRIVATE 915 ${COMMON_INCLUDES} 916) 917 918target_compile_options(ot-test-netif 919 PRIVATE 920 ${COMMON_COMPILE_OPTIONS} 921) 922 923target_link_libraries(ot-test-netif 924 PRIVATE 925 ${COMMON_LIBS} 926) 927 928add_test(NAME ot-test-netif COMMAND ot-test-netif) 929 930add_executable(ot-test-network-data 931 test_network_data.cpp 932) 933 934target_include_directories(ot-test-network-data 935 PRIVATE 936 ${COMMON_INCLUDES} 937) 938 939target_compile_options(ot-test-network-data 940 PRIVATE 941 ${COMMON_COMPILE_OPTIONS} 942) 943 944target_link_libraries(ot-test-network-data 945 PRIVATE 946 ${COMMON_LIBS} 947) 948 949add_test(NAME ot-test-network-data COMMAND ot-test-network-data) 950 951add_executable(ot-test-pool 952 test_pool.cpp 953) 954 955target_include_directories(ot-test-pool 956 PRIVATE 957 ${COMMON_INCLUDES} 958) 959 960target_compile_options(ot-test-pool 961 PRIVATE 962 ${COMMON_COMPILE_OPTIONS} 963) 964 965target_link_libraries(ot-test-pool 966 PRIVATE 967 ${COMMON_LIBS} 968) 969 970add_test(NAME ot-test-pool COMMAND ot-test-pool) 971 972add_executable(ot-test-power-calibration 973 test_power_calibration.cpp 974) 975 976target_include_directories(ot-test-power-calibration 977 PRIVATE 978 ${COMMON_INCLUDES} 979) 980 981target_compile_options(ot-test-power-calibration 982 PRIVATE 983 ${COMMON_COMPILE_OPTIONS} 984) 985 986target_link_libraries(ot-test-power-calibration 987 PRIVATE 988 ${COMMON_LIBS} 989) 990 991add_test(NAME ot-test-power-calibration COMMAND ot-test-power-calibration) 992 993add_executable(ot-test-priority-queue 994 test_priority_queue.cpp 995) 996 997target_include_directories(ot-test-priority-queue 998 PRIVATE 999 ${COMMON_INCLUDES} 1000) 1001 1002target_compile_options(ot-test-priority-queue 1003 PRIVATE 1004 ${COMMON_COMPILE_OPTIONS} 1005) 1006 1007target_link_libraries(ot-test-priority-queue 1008 PRIVATE 1009 ${COMMON_LIBS} 1010) 1011 1012add_test(NAME ot-test-priority-queue COMMAND ot-test-priority-queue) 1013 1014add_executable(ot-test-pskc 1015 test_pskc.cpp 1016) 1017 1018target_include_directories(ot-test-pskc 1019 PRIVATE 1020 ${COMMON_INCLUDES} 1021) 1022 1023target_compile_options(ot-test-pskc 1024 PRIVATE 1025 ${COMMON_COMPILE_OPTIONS} 1026) 1027 1028target_link_libraries(ot-test-pskc 1029 PRIVATE 1030 ${COMMON_LIBS} 1031) 1032 1033add_test(NAME ot-test-pskc COMMAND ot-test-pskc) 1034 1035add_executable(ot-test-smart-ptrs 1036 test_smart_ptrs.cpp 1037) 1038 1039target_include_directories(ot-test-smart-ptrs 1040 PRIVATE 1041 ${COMMON_INCLUDES} 1042) 1043 1044target_compile_options(ot-test-smart-ptrs 1045 PRIVATE 1046 ${COMMON_COMPILE_OPTIONS} 1047) 1048 1049target_link_libraries(ot-test-smart-ptrs 1050 PRIVATE 1051 ${COMMON_LIBS} 1052) 1053 1054add_test(NAME ot-test-smart-ptrs COMMAND ot-test-smart-ptrs) 1055 1056add_executable(ot-test-meshcop 1057 test_meshcop.cpp 1058) 1059 1060target_include_directories(ot-test-meshcop 1061 PRIVATE 1062 ${COMMON_INCLUDES} 1063) 1064 1065target_compile_options(ot-test-meshcop 1066 PRIVATE 1067 ${COMMON_COMPILE_OPTIONS} 1068) 1069 1070target_link_libraries(ot-test-meshcop 1071 PRIVATE 1072 ${COMMON_LIBS} 1073) 1074 1075add_test(NAME ot-test-meshcop COMMAND ot-test-meshcop) 1076 1077add_executable(ot-test-serial-number 1078 test_serial_number.cpp 1079) 1080 1081add_executable(ot-test-routing-manager 1082 test_routing_manager.cpp 1083) 1084 1085target_include_directories(ot-test-routing-manager 1086 PRIVATE 1087 ${COMMON_INCLUDES} 1088) 1089 1090target_compile_options(ot-test-routing-manager 1091 PRIVATE 1092 ${COMMON_COMPILE_OPTIONS} 1093) 1094 1095target_link_libraries(ot-test-routing-manager 1096 PRIVATE 1097 ${COMMON_LIBS} 1098) 1099 1100add_test(NAME ot-test-routing-manager COMMAND ot-test-routing-manager) 1101 1102target_include_directories(ot-test-serial-number 1103 PRIVATE 1104 ${COMMON_INCLUDES} 1105) 1106 1107target_compile_options(ot-test-serial-number 1108 PRIVATE 1109 ${COMMON_COMPILE_OPTIONS} 1110) 1111 1112target_link_libraries(ot-test-serial-number 1113 PRIVATE 1114 ${COMMON_LIBS} 1115) 1116 1117add_test(NAME ot-test-serial-number COMMAND ot-test-serial-number) 1118 1119add_executable(ot-test-srp-server 1120 test_srp_server.cpp 1121) 1122 1123target_include_directories(ot-test-srp-server 1124 PRIVATE 1125 ${COMMON_INCLUDES} 1126) 1127 1128target_compile_options(ot-test-srp-server 1129 PRIVATE 1130 ${COMMON_COMPILE_OPTIONS} 1131) 1132 1133target_link_libraries(ot-test-srp-server 1134 PRIVATE 1135 ${COMMON_LIBS} 1136) 1137 1138add_test(NAME ot-test-srp-server COMMAND ot-test-srp-server) 1139 1140 1141add_executable(ot-test-string 1142 test_string.cpp 1143) 1144 1145target_include_directories(ot-test-string 1146 PRIVATE 1147 ${COMMON_INCLUDES} 1148) 1149 1150target_compile_options(ot-test-string 1151 PRIVATE 1152 ${COMMON_COMPILE_OPTIONS} 1153) 1154 1155target_link_libraries(ot-test-string 1156 PRIVATE 1157 ${COMMON_LIBS} 1158) 1159 1160add_test(NAME ot-test-string COMMAND ot-test-string) 1161 1162add_executable(ot-test-timer 1163 test_timer.cpp 1164) 1165 1166add_executable(ot-test-toolchain 1167 test_toolchain.cpp test_toolchain_c.c 1168) 1169 1170target_include_directories(ot-test-toolchain 1171 PRIVATE 1172 ${COMMON_INCLUDES} 1173) 1174 1175target_link_libraries(ot-test-toolchain 1176 PRIVATE 1177 ${COMMON_LIBS} 1178) 1179 1180add_test(NAME ot-test-toolchain COMMAND ot-test-toolchain) 1181 1182target_include_directories(ot-test-timer 1183 PRIVATE 1184 ${COMMON_INCLUDES} 1185) 1186 1187target_compile_options(ot-test-timer 1188 PRIVATE 1189 ${COMMON_COMPILE_OPTIONS} 1190) 1191 1192target_link_libraries(ot-test-timer 1193 PRIVATE 1194 ${COMMON_LIBS} 1195) 1196 1197add_test(NAME ot-test-timer COMMAND ot-test-timer) 1198 1199add_executable(ot-test-trickle-timer 1200 test_trickle_timer.cpp 1201) 1202 1203target_include_directories(ot-test-trickle-timer 1204 PRIVATE 1205 ${COMMON_INCLUDES} 1206) 1207 1208target_compile_options(ot-test-trickle-timer 1209 PRIVATE 1210 ${COMMON_COMPILE_OPTIONS} 1211) 1212 1213target_link_libraries(ot-test-trickle-timer 1214 PRIVATE 1215 ${COMMON_LIBS} 1216) 1217 1218add_test(NAME ot-test-trickle-timer COMMAND ot-test-trickle-timer) 1219 1220add_executable(ot-test-tlv 1221 test_tlv.cpp 1222) 1223 1224target_include_directories(ot-test-tlv 1225 PRIVATE 1226 ${COMMON_INCLUDES} 1227) 1228 1229target_compile_options(ot-test-tlv 1230 PRIVATE 1231 ${COMMON_COMPILE_OPTIONS} 1232) 1233 1234target_link_libraries(ot-test-tlv 1235 PRIVATE 1236 ${COMMON_LIBS} 1237) 1238 1239add_test(NAME ot-test-tlv COMMAND ot-test-tlv) 1240 1241add_executable(ot-test-hdlc 1242 test_hdlc.cpp 1243) 1244target_include_directories(ot-test-hdlc 1245 PRIVATE 1246 ${COMMON_INCLUDES} 1247) 1248target_compile_options(ot-test-hdlc 1249 PRIVATE 1250 ${COMMON_COMPILE_OPTIONS} 1251) 1252target_link_libraries(ot-test-hdlc 1253 PRIVATE 1254 ${COMMON_LIBS} 1255) 1256add_test(NAME ot-test-hdlc COMMAND ot-test-hdlc) 1257 1258add_executable(ot-test-spinel-buffer 1259 test_spinel_buffer.cpp 1260) 1261target_include_directories(ot-test-spinel-buffer 1262 PRIVATE 1263 ${COMMON_INCLUDES} 1264) 1265target_compile_options(ot-test-spinel-buffer 1266 PRIVATE 1267 ${COMMON_COMPILE_OPTIONS} 1268) 1269target_link_libraries(ot-test-spinel-buffer 1270 PRIVATE 1271 ${COMMON_LIBS} 1272) 1273add_test(NAME ot-test-spinel-buffer COMMAND ot-test-spinel-buffer) 1274 1275add_executable(ot-test-spinel-decoder 1276 test_spinel_decoder.cpp 1277) 1278target_include_directories(ot-test-spinel-decoder 1279 PRIVATE 1280 ${COMMON_INCLUDES} 1281) 1282target_compile_options(ot-test-spinel-decoder 1283 PRIVATE 1284 ${COMMON_COMPILE_OPTIONS} 1285) 1286target_link_libraries(ot-test-spinel-decoder 1287 PRIVATE 1288 ${COMMON_LIBS} 1289) 1290add_test(NAME ot-test-spinel-decoder COMMAND ot-test-spinel-decoder) 1291 1292add_executable(ot-test-spinel-encoder 1293 test_spinel_encoder.cpp 1294) 1295target_include_directories(ot-test-spinel-encoder 1296 PRIVATE 1297 ${COMMON_INCLUDES} 1298) 1299target_compile_options(ot-test-spinel-encoder 1300 PRIVATE 1301 ${COMMON_COMPILE_OPTIONS} 1302) 1303target_link_libraries(ot-test-spinel-encoder 1304 PRIVATE 1305 ${COMMON_LIBS} 1306) 1307add_test(NAME ot-test-spinel-encoder COMMAND ot-test-spinel-encoder) 1308 1309add_executable(ot-test-address-sanitizer 1310 test_address_sanitizer.cpp 1311) 1312target_include_directories(ot-test-address-sanitizer 1313 PRIVATE 1314 ${COMMON_INCLUDES} 1315) 1316target_compile_options(ot-test-address-sanitizer 1317 PRIVATE 1318 ${COMMON_COMPILE_OPTIONS} 1319) 1320target_link_libraries(ot-test-address-sanitizer 1321 PRIVATE 1322 ${COMMON_LIBS} 1323) 1324add_test(NAME ot-test-address-sanitizer COMMAND ot-test-address-sanitizer) 1325 1326add_executable(ot-test-url 1327 test_url.cpp 1328) 1329target_include_directories(ot-test-url 1330 PRIVATE 1331 ${COMMON_INCLUDES} 1332) 1333target_compile_options(ot-test-url 1334 PRIVATE 1335 ${COMMON_COMPILE_OPTIONS} 1336) 1337target_link_libraries(ot-test-url 1338 PRIVATE 1339 ${COMMON_LIBS} 1340 openthread-url 1341) 1342add_test(NAME ot-test-url COMMAND ot-test-url) 1343