deviceinfo_func_test.c 22.2 KB
Newer Older
L
leiyuqian 已提交
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41
/*
 * Copyright (c) 2020-2021 Huawei Device Co., Ltd.
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

#include <securec.h>
#include "hctest.h"
#include "ohos_types.h"
#include "parameter.h"
#include "parameter_utils.h"

#define MAX_LEN 128
#define INVALID_LEN 2
#define COMMON_ERROR (-1)
#define INVALID_PARAMETER (-9)

static const char* g_defSysParam = "data of sys param ***...";

/**
 * @tc.desc      : register a test suite, this suite is used to test basic flow
 * and interface dependency
 * @param        : subsystem name is utils
 * @param        : module name is parameter
 * @param        : test suit name is DeviceInfoFuncTestSuite
 */
LITE_TEST_SUIT(startup, deviceinfo, DeviceInfoFuncTestSuite);

/**
 * @tc.setup     : setup for all testcases
 * @return       : setup result, TRUE is success, FALSE is fail
 */
42 43
static BOOL DeviceInfoFuncTestSuiteSetUp(void)
{
L
leiyuqian 已提交
44 45 46 47 48 49 50
    return TRUE;
}

/**
 * @tc.teardown  : teardown for all testcases
 * @return       : teardown result, TRUE is success, FALSE is fail
 */
51 52
static BOOL DeviceInfoFuncTestSuiteTearDown(void)
{
L
leiyuqian 已提交
53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718
    printf("+--------------------------------------------+\n");
    return TRUE;
}

/**
 * @tc.name      : testGetDeviceTypeFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0100
 * @tc.desc      : test obtaining device info DeviceType is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetDeviceTypeFun001,
               Function | MediumTest | Level1) {
    const char* value = GetDeviceType();
    printf("Device Type=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetDeviceTypeFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0200
 * @tc.desc      : test obtaining device info DeviceType that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetDeviceTypeFun002,
               Function | MediumTest | Level1) {
    const char* value = GetDeviceType();
    printf("Device Type=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetManufactureFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0300
 * @tc.desc      : test obtaining device info Manufacture is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetManufactureFun001,
               Function | MediumTest | Level1) {
    const char* value = GetManufacture();
    printf("Manufacture=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetManufactureFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0400
 * @tc.desc      : test obtaining device info Manufacture that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetManufactureFun002,
               Function | MediumTest | Level1) {
    const char* value = GetManufacture();
    printf("Manufacture=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetBrandFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0500
 * @tc.desc      : test obtaining device info Brand is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBrandFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBrand();
    printf("Brand=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetBrandFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0600
 * @tc.desc      : test obtaining device info Brand that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBrandFun002,
               Function | MediumTest | Level1) {
    const char* value = GetBrand();
    printf("Brand=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetMarketNameFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0700
 * @tc.desc      : test obtaining device info MarketName is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetMarketNameFun001,
               Function | MediumTest | Level1) {
    const char* value = GetMarketName();
    printf("Market Name=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetMarketNameFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0800
 * @tc.desc      : test obtaining device info MarketName that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetMarketNameFun002,
               Function | MediumTest | Level1) {
    const char* value = GetMarketName();
    printf("Market Name=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetProductSeriesFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_0900
 * @tc.desc      : test obtaining device info ProductSeries is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetProductSeriesFun001,
               Function | MediumTest | Level1) {
    const char* value = GetProductSeries();
    printf("Product Series=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetProductSeriesFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1000
 * @tc.desc      : test obtaining device info ProductSeries that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetProductSeriesFun002,
               Function | MediumTest | Level1) {
    const char* value = GetProductSeries();
    printf("Product Series=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetProductModelFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1100
 * @tc.desc      : test obtaining device info ProductModel is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetProductModelFun001,
               Function | MediumTest | Level1) {
    const char* value = GetProductModel();
    printf("Product Model=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetProductModelFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1200
 * @tc.desc      : test obtaining device info ProductModel that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetProductModelFun002,
               Function | MediumTest | Level1) {
    const char* value = GetProductModel();
    printf("Product Model=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetHardwareModel001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1300
 * @tc.desc      : test obtaining device info HardwareModel is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetHardwareModel001,
               Function | MediumTest | Level1) {
    const char* value = GetHardwareModel();
    printf("Hardware Model=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetHardwareModel002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1400
 * @tc.desc      : test obtaining device info HardwareModel that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetHardwareModel002,
               Function | MediumTest | Level1) {
    const char* value = GetHardwareModel();
    printf("Hardware Model=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetSerialFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1500
 * @tc.desc      : test obtaining device info Serial is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSerialFun001,
               Function | MediumTest | Level1) {
    const char* value = GetSerial();
    printf("Serial=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetSerialFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1600
 * @tc.desc      : test obtaining device info Serial that less than 64
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSerialFun002,
               Function | MediumTest | Level1) {
    const char* value = GetSerial();
    printf("Serial=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 64);
    }
};

/**
 * @tc.name      : testGetOSFullNameFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1700
 * @tc.desc      : test obtaining device info OSFullName is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetOSFullNameFun001,
               Function | MediumTest | Level1) {
    const char* value = GetOSFullName();
    printf("Os Name=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetOSFullNameFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1800
 * @tc.desc      : test obtaining device info OSFullName that less than 64
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetOSFullNameFun002,
               Function | MediumTest | Level1) {
    const char* value = GetOSFullName();
    printf("Os Name=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 64);
    }
};

/**
 * @tc.name      : testGetDisplayVersionFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_1900
 * @tc.desc      : test obtaining device info DisplayVersion is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetDisplayVersionFun001,
               Function | MediumTest | Level1) {
    const char* value = GetDisplayVersion();
    printf("Display Version=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetDisplayVersionFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2000
 * @tc.desc      : test obtaining device info DisplayVersion that less than 64
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetDisplayVersionFun002,
               Function | MediumTest | Level1) {
    const char* value = GetDisplayVersion();
    printf("Display Version=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 64);
    }
};

/**
 * @tc.name      : testGetBootloaderVersionFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2100
 * @tc.desc      : test obtaining device info BootloaderVersion is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBootloaderVersionFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBootloaderVersion();
    printf("Bootloader Version=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetBootloaderVersionFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2200
 * @tc.desc      : test obtaining device info BootloaderVersion that less
 * than 64 characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBootloaderVersionFun002,
               Function | MediumTest | Level1) {
    const char* value = GetBootloaderVersion();
    printf("Bootloader Version=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 64);
    }
};

/**
 * @tc.name      : testGetSecurityPatchTagFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2300
 * @tc.desc      : test obtaining device info SecurityPatchTag is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSecurityPatchTagFun001,
               Function | MediumTest | Level1) {
    const char* value = GetSecurityPatchTag();
    printf("Secure Patch Level=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetSecurityPatchTagFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2400
 * @tc.desc      : test obtaining device info SecurityPatchTag that less
 * than 64 characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSecurityPatchTagFun002,
               Function | MediumTest | Level1) {
    const char* value = GetSecurityPatchTag();
    printf("Secure Patch Level=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 64);
    }
};

/**
 * @tc.name      : testGetSecurityPatchTagFun003
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2500
 * @tc.desc      : test obtaining device info SecurityPatchTag which format is
 * yy-mm-dd
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSecurityPatchTagFun003,
               Function | MediumTest | Level1) {
    const char* value = GetSecurityPatchTag();
    printf("Secure Patch Level=%s\n", value);

    int year, month, day;
    sscanf(value, "%04d-%02d-%02d", &year, &month, &day);
    printf("%04d-%02d-%02d\n", year, month, day);

    TEST_ASSERT_TRUE(year > 1900 && year < 2056);
    TEST_ASSERT_TRUE(month <= 12 && month > 0);
    TEST_ASSERT_TRUE(day <= 31 && day > 0);

    char str[10] = {0};
    sprintf(str, "%d-%02d-%02d", year, month, day);
    printf("str=%s\n", str);
    TEST_ASSERT_EQUAL_STRING(str, value);
};

/**
 * @tc.name      : testGetAbiListFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2600
 * @tc.desc      : test obtaining device info AbiList is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetAbiListFun001,
               Function | MediumTest | Level1) {
    const char* value = GetAbiList();
    printf("Abi List=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetAbiListFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2700
 * @tc.desc      : test obtaining device info AbiList that less than 64
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetAbiListFun002,
               Function | MediumTest | Level1) {
    const char* value = GetAbiList();
    printf("Abi List=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 64);
    }
};

/**
 * @tc.name      : testGetSdkApiVersionFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2800
 * @tc.desc      : test obtaining device info SdkApiVersion is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSdkApiVersionFun001,
               Function | MediumTest | Level1) {
    int value = GetSdkApiVersion();
    printf("Sdk Api Level=%d\n", value);
    TEST_ASSERT_TRUE(value > 0);
};

/**
 * @tc.name      : testGetFirstApiVersionFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_2900
 * @tc.desc      : test obtaining device info FirstApiVersion is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetFirstApiVersionFun001,
               Function | MediumTest | Level1) {
    int value = GetFirstApiVersion();
    printf("First Api Level=%d\n", value);
    TEST_ASSERT_TRUE(value > 0);
};

/**
 * @tc.name      : testGetIncrementalVersionFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3000
 * @tc.desc      : test obtaining device info IncrementalVersion is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetIncrementalVersionFun001,
               Function | MediumTest | Level1) {
    const char* value = GetIncrementalVersion();
    printf("Incremental Version=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetVersionIdFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3100
 * @tc.desc      : test obtaining device info VersionId is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetVersionIdFun001,
               Function | MediumTest | Level1) {
    const char* value = GetVersionId();
    printf("Version Id=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetVersionIdFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3200
 * @tc.desc      : test obtaining device info VersionId that less than 127
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetVersionIdFun002,
               Function | MediumTest | Level1) {
    const char* value = GetVersionId();
    printf("Version Id=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 127);
    }
};

/**
 * @tc.name      : testGetBuildTypeFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3300
 * @tc.desc      : test obtaining device info BuildType is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildTypeFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBuildType();
    printf("Build Type=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetBuildTypeFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3400
 * @tc.desc      : test obtaining device info BuildType that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildTypeFun002,
               Function | MediumTest | Level1) {
    const char* value = GetBuildType();
    printf("Build Type=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetBuildUserFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3500
 * @tc.desc      : test obtaining device info BuildUser is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildUserFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBuildUser();
    printf("Build User=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetBuildUserFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3600
 * @tc.desc      : test obtaining device info BuildUser that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildUserFun002,
               Function | MediumTest | Level1) {
    const char* value = GetBuildUser();
    printf("Build User=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetBuildHostFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3700
 * @tc.desc      : test obtaining device info BuildHost is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildHostFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBuildHost();
    printf("Build Host=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetBuildHostFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3800
 * @tc.desc      : test obtaining device info BuildHost that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildHostFun002,
               Function | MediumTest | Level1) {
    const char* value = GetBuildHost();
    printf("Build Host=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetBuildTimeFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_3900
 * @tc.desc      : test obtaining device info BuildTime is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildTimeFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBuildTime();
    printf("Build Time=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetBuildTimeFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_4000
 * @tc.desc      : test obtaining device info BuildTime that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildTimeFun002,
               Function | MediumTest | Level1) {
    const char* value = GetBuildTime();
    printf("Build Time=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetSoftwareModelFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_4100
 * @tc.desc      : test obtaining device info SoftwareModel is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSoftwareModelFun001,
               Function | MediumTest | Level1) {
    const char* value = GetSoftwareModel();
    printf("Software Model=%s\n", value);
    AssertNotEmpty(value);
};

/**
 * @tc.name      : testGetSoftwareModelFun002
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_4200
 * @tc.desc      : test obtaining device info SoftwareModel that less than 32
 * characters.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetSoftwareModelFun002,
               Function | MediumTest | Level1) {
    const char* value = GetSoftwareModel();
    printf("Software Model=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
    if (value != NULL) {
        TEST_ASSERT_TRUE(strlen(value) <= 32);
    }
};

/**
 * @tc.name      : testGetBuildRootHashFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_4500
 * @tc.desc      : test obtaining device info BuildRootHash is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetBuildRootHashFun001,
               Function | MediumTest | Level1) {
    const char* value = GetBuildRootHash();
    printf("Build Root Hash=%s\n", value);
    TEST_ASSERT_NOT_NULL(value);
};

/**
 * @tc.name      : testGetHardwareProfileFun001
 * @tc.number    : SUB_STARTUP_MINI_DEVICEINFO_FUN_4600
 * @tc.desc      : test obtaining device info HardwareProfile is not null.
 */
LITE_TEST_CASE(DeviceInfoFuncTestSuite,
               testGetHardwareProfileFun001,
               Function | MediumTest | Level1) {
    const char* value = GetHardwareProfile();
    printf("Hardware Profile=%s\n", value);
    AssertNotEmpty(value);
};

RUN_TEST_SUITE(DeviceInfoFuncTestSuite);