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