From 3ef0ef36d5c386cc95ea368cc72e55d22e45a175 Mon Sep 17 00:00:00 2001 From: qu-xianfei Date: Mon, 6 Mar 2023 17:20:29 +0800 Subject: [PATCH] add new device_attest testcase Signed-off-by: qu-xianfei Change-Id: Ic98ca6b033dd8a6ec1c74b616afd73cdec3ed946 --- device_attest/BUILD.gn | 23 ++++ device_attest/deviceAttest/AppScope/app.json | 21 ++++ .../resources/base/element/string.json | 8 ++ .../resources/base/media/app_icon.png | Bin 0 -> 15458 bytes device_attest/deviceAttest/BUILD.gn | 41 ++++++ device_attest/deviceAttest/Test.json | 18 +++ .../src/main/ets/Application/AbilityStage.ts | 9 ++ .../src/main/ets/MainAbility/MainAbility.ts | 37 ++++++ .../ets/MainAbility/pages/index/index.ets | 56 +++++++++ .../src/main/ets/TestAbility/TestAbility.ts | 50 ++++++++ .../src/main/ets/TestAbility/pages/index.ets | 48 +++++++ .../ets/TestRunner/OpenHarmonyTestRunner.ts | 78 ++++++++++++ .../entry/src/main/ets/test/List.test.ets | 19 +++ .../main/ets/test/deviceAttestInfo.test.ets | 119 ++++++++++++++++++ .../deviceAttest/entry/src/main/module.json | 41 ++++++ .../main/resources/base/element/string.json | 32 +++++ .../src/main/resources/base/media/icon.png | Bin 0 -> 15458 bytes .../resources/base/profile/main_pages.json | 5 + .../deviceAttest/signature/openharmony_sx.p7b | Bin 0 -> 3437 bytes test_packages.gni | 1 + 20 files changed, 606 insertions(+) create mode 100644 device_attest/BUILD.gn create mode 100644 device_attest/deviceAttest/AppScope/app.json create mode 100644 device_attest/deviceAttest/AppScope/resources/base/element/string.json create mode 100644 device_attest/deviceAttest/AppScope/resources/base/media/app_icon.png create mode 100644 device_attest/deviceAttest/BUILD.gn create mode 100644 device_attest/deviceAttest/Test.json create mode 100644 device_attest/deviceAttest/entry/src/main/ets/Application/AbilityStage.ts create mode 100644 device_attest/deviceAttest/entry/src/main/ets/MainAbility/MainAbility.ts create mode 100644 device_attest/deviceAttest/entry/src/main/ets/MainAbility/pages/index/index.ets create mode 100644 device_attest/deviceAttest/entry/src/main/ets/TestAbility/TestAbility.ts create mode 100644 device_attest/deviceAttest/entry/src/main/ets/TestAbility/pages/index.ets create mode 100644 device_attest/deviceAttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts create mode 100644 device_attest/deviceAttest/entry/src/main/ets/test/List.test.ets create mode 100644 device_attest/deviceAttest/entry/src/main/ets/test/deviceAttestInfo.test.ets create mode 100644 device_attest/deviceAttest/entry/src/main/module.json create mode 100644 device_attest/deviceAttest/entry/src/main/resources/base/element/string.json create mode 100644 device_attest/deviceAttest/entry/src/main/resources/base/media/icon.png create mode 100644 device_attest/deviceAttest/entry/src/main/resources/base/profile/main_pages.json create mode 100644 device_attest/deviceAttest/signature/openharmony_sx.p7b diff --git a/device_attest/BUILD.gn b/device_attest/BUILD.gn new file mode 100644 index 000000000..e2ca8b3d2 --- /dev/null +++ b/device_attest/BUILD.gn @@ -0,0 +1,23 @@ +# Copyright (c) 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. + +import("//build/ohos_var.gni") + +group("device_attest") { + testonly = true + if (is_standard_system) { + deps = [ + "deviceAttest:deviceAttest_hap_test", + ] + } +} diff --git a/device_attest/deviceAttest/AppScope/app.json b/device_attest/deviceAttest/AppScope/app.json new file mode 100644 index 000000000..7f5bcd120 --- /dev/null +++ b/device_attest/deviceAttest/AppScope/app.json @@ -0,0 +1,21 @@ +{ + "app": { + "bundleName": "com.example.DeviceAttest", + "vendor": "huawei", + "versionCode": 1000000, + "versionName": "1.0.0", + "debug": false, + "icon": "$media:icon", + "label": "$string:app_name", + "description": "$string:description_application", + "distributedNotificationEnabled": true, + "keepAlive": true, + "singleUser": true, + "minAPIVersion": 9, + "targetAPIVersion": 9, + "car": { + "apiCompatibleVersion": 9, + "singleUser": false + } + } +} \ No newline at end of file diff --git a/device_attest/deviceAttest/AppScope/resources/base/element/string.json b/device_attest/deviceAttest/AppScope/resources/base/element/string.json new file mode 100644 index 000000000..ee69f9a86 --- /dev/null +++ b/device_attest/deviceAttest/AppScope/resources/base/element/string.json @@ -0,0 +1,8 @@ +{ + "string":[ + { + "name":"app_name", + "value":"ohosProject" + } + ] +} \ No newline at end of file diff --git a/device_attest/deviceAttest/AppScope/resources/base/media/app_icon.png b/device_attest/deviceAttest/AppScope/resources/base/media/app_icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXfJNHRMK~#8N)t$?W zZ`*d)f6uD@IOn2&LJ;lP6@!gHh#>Y1!r&0HL_gDqb&`3X(Z=GaQp8SP` z92In5!tr>lHv4nxKS1{J@p1P!+F4$_JksuYcRrnVr_*tFKEi|jF}%m8r`_Y_l6p^% z@+LnCznqL`mDBrry9$FzRWuxkQF=}GpwhbiR|yW zmfjQNx4tFelhpeM=s1qPZ}7VBtuHUqIh+_+IvN7$>(jXIa?55SEAd6rfw_FG^Ciq> zUAOb*d;6XH7UwzzrTnE1QtLJmPK4||=GS#JMbf8dX;2o^T+5qYx7QF%t86tY^M!6V zrngTY z1udv}ju^g5nNRXGgh*Bp3Mrd$sWa|p#az3e^Glh~4OYDwx?a*KW72*IFc`5a72{iM zp*N~%>#A7GyQ5CGc@5sreOI4Vr-jh46-ty$UgtlNS4u^>BKcJpW(i@*S9!$UCqmcd z(U6LQxPK-@LYcI@ROQlUqYfv9)@pP1D z^PGd_#Bn=j?h;(A2YP*^zO{q!-impmO*sshM)pxC{aRnxpLI$OVz(ElViw;?d~N$q$^VbIP>sa0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pAH?^`km{I01IzdD7@r|t*_4y`9@NA5 zq$<1;c6}R8!%NJeZ{_C?c;3;(Bhvgl9`1TUrhJs+)3eHTVN^Wtf9v1;w`bk-!U80# zPb4Nai`;Q4VyWJmBm(HGVb%x!$o9g(m z@BNm8)L5LW41ks^%nDsO9dc#n{!ihj%?OK8jS5s)q|ox6AsyuMaEws?(61<4>Dl&% z(AowWE}sZbd2$Fpd3X!W{44-|eRU%5z)~*gA?R**Vyu2$E5~BWM~PgBBq$=kqGE67 z`@|=dDkKs@MXyRk(q=Sb__5!7i&kaqd|~>q`yW64akf!;YC=W70<8l5tW13-+~|Y; zkOj7m+O z!5pPf&u5hW8I_=fD zD*;20N{)BIOQ{tj;NRl5w-|ch2}M5c{wK!f>CfqKoBq&WEM66PqkaN5`Y)t8TRI`--F?$f7FyF2*vpx(dgmuRWV_Q&1- Y0jIQKqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/device_attest/deviceAttest/BUILD.gn b/device_attest/deviceAttest/BUILD.gn new file mode 100644 index 000000000..cdeef5cc1 --- /dev/null +++ b/device_attest/deviceAttest/BUILD.gn @@ -0,0 +1,41 @@ +# Copyright (c) 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. + +import("//test/xts/tools/build/suite.gni") + +ohos_js_hap_suite("deviceAttest_hap_test") { + hap_profile = "entry/src/main/module.json" + js_build_mode = "debug" + deps = [ + ":graphicColorSpace_js_assets", + ":graphicColorSpace_resources", + ] + ets2abc = true + certificate_profile = "signature/openharmony_sx.p7b" + hap_name = "ActsDeviceAttestTest" +} + +ohos_app_scope("graphicColorSpace_app_profile") { + app_profile = "AppScope/app.json" + sources = [ "AppScope/resources" ] +} + +ohos_js_assets("graphicColorSpace_js_assets") { + source_dir = "entry/src/main/ets" +} + +ohos_resources("graphicColorSpace_resources") { + sources = [ "entry/src/main/resources" ] + deps = [ ":graphicColorSpace_app_profile" ] + hap_profile = "entry/src/main/module.json" +} diff --git a/device_attest/deviceAttest/Test.json b/device_attest/deviceAttest/Test.json new file mode 100644 index 000000000..e5628aae2 --- /dev/null +++ b/device_attest/deviceAttest/Test.json @@ -0,0 +1,18 @@ +{ + "description": "Configuration for hjunit demo Tests", + "driver": { + "type": "OHJSUnitTest", + "test-timeout": "360000", + "bundle-name": "com.example.DeviceAttest", + "module-name": "phone", + "shell-timeout": "360000", + "testcase-timeout": 70000 + }, + "kits": [{ + "test-file-name": [ + "ActsDeviceAttestTest.hap" + ], + "type": "AppInstallKit", + "cleanup-apps": true + }] +} \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/ets/Application/AbilityStage.ts b/device_attest/deviceAttest/entry/src/main/ets/Application/AbilityStage.ts new file mode 100644 index 000000000..b0e0206ea --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/Application/AbilityStage.ts @@ -0,0 +1,9 @@ +import AbilityStage from "@ohos.app.ability.AbilityStage" + +export default class MyAbilityStage extends AbilityStage { + onCreate() { + console.log("[Demo] MyAbilityStage onCreate") + globalThis.stageOnCreateRun = 1; + globalThis.stageContext = this.context; + } +} diff --git a/device_attest/deviceAttest/entry/src/main/ets/MainAbility/MainAbility.ts b/device_attest/deviceAttest/entry/src/main/ets/MainAbility/MainAbility.ts new file mode 100644 index 000000000..4d66065e8 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/MainAbility/MainAbility.ts @@ -0,0 +1,37 @@ +import Ability from '@ohos.app.ability.UIAbility' + +export default class MainAbility extends Ability { + onCreate(want,launchParam){ + // Ability is creating, initialize resources for this ability + console.log("[Demo] MainAbility onCreate") + globalThis.abilityWant = want; + } + + onDestroy() { + // Ability is destroying, release resources for this ability + console.log("[Demo] MainAbility onDestroy") + } + + onWindowStageCreate(windowStage) { + // Main window is created, set main page for this ability + console.log("[Demo] MainAbility onWindowStageCreate windowStage="+ windowStage) + globalThis.windowStage = windowStage + globalThis.abilityContext = this.context + windowStage.setUIContent(this.context, "MainAbility/pages/index/index", null) + } + + onWindowStageDestroy() { + //Main window is destroyed, release UI related resources + console.log("[Demo] MainAbility onWindowStageDestroy") + } + + onForeground() { + // Ability has brought to foreground + console.log("[Demo] MainAbility onForeground") + } + + onBackground() { + // Ability has back to background + console.log("[Demo] MainAbility onBackground") + } +}; \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/ets/MainAbility/pages/index/index.ets b/device_attest/deviceAttest/entry/src/main/ets/MainAbility/pages/index/index.ets new file mode 100644 index 000000000..97504e244 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/MainAbility/pages/index/index.ets @@ -0,0 +1,56 @@ +/* + * Copyright (c) 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. + */ +import router from '@ohos.router'; +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' +import { Hypium } from '@ohos/hypium' +import testsuite from '../../../test/List.test' + + +@Entry +@Component +struct Index { + + aboutToAppear(){ + console.info("start run testcase!!!!") + var abilityDelegator: any + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var abilityDelegatorArguments: any + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + console.info('start run testcase!!!') + Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite) + } + + build() { + Flex({ direction:FlexDirection.Column, alignItems:ItemAlign.Center, justifyContent: FlexAlign.Center }) { + Text('Hello World') + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(25) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .onClick(() => { + + }) + } + .width('100%') + .height('100%') + } +} \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/ets/TestAbility/TestAbility.ts b/device_attest/deviceAttest/entry/src/main/ets/TestAbility/TestAbility.ts new file mode 100644 index 000000000..8028a70f8 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/TestAbility/TestAbility.ts @@ -0,0 +1,50 @@ +/* + * Copyright (c) 2022 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. + */ +import Ability from '@ohos.app.ability.UIAbility' + +export default class TestAbility extends Ability { + onCreate(want, launchParam) { + console.log('TestAbility onCreate') + } + + onDestroy() { + console.log('TestAbility onDestroy') + } + + onWindowStageCreate(windowStage) { + console.log('TestAbility onWindowStageCreate') + windowStage.loadContent("TestAbility/pages/index", (err, data) => { + if (err.code) { + console.error('Failed to load the content. Cause:' + JSON.stringify(err)); + return; + } + console.info('Succeeded in loading the content. Data: ' + JSON.stringify(data)) + }); + + globalThis.abilityContext = this.context; + } + + onWindowStageDestroy() { + console.log('TestAbility onWindowStageDestroy') + } + + onForeground() { + console.log('TestAbility onForeground') + } + + onBackground() { + console.log('TestAbility onBackground') + } +}; \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/ets/TestAbility/pages/index.ets b/device_attest/deviceAttest/entry/src/main/ets/TestAbility/pages/index.ets new file mode 100644 index 000000000..b93567f96 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/TestAbility/pages/index.ets @@ -0,0 +1,48 @@ +/* + * Copyright (c) 2022 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. + */ +import router from '@ohos.router'; + +@Entry +@Component +struct Index { + aboutToAppear() { + console.info('TestAbility index aboutToAppear') + } + @State message: string = 'Hello World' + build() { + Row() { + Column() { + Text(this.message) + .fontSize(50) + .fontWeight(FontWeight.Bold) + Button() { + Text('next page') + .fontSize(20) + .fontWeight(FontWeight.Bold) + }.type(ButtonType.Capsule) + .margin({ + top: 20 + }) + .backgroundColor('#0D9FFB') + .width('35%') + .height('5%') + .onClick(()=>{ + }) + } + .width('100%') + } + .height('100%') + } + } \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts b/device_attest/deviceAttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts new file mode 100644 index 000000000..257a3c931 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/TestRunner/OpenHarmonyTestRunner.ts @@ -0,0 +1,78 @@ +/* + * Copyright (c) 2022 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. + */ +import TestRunner from '@ohos.application.testRunner' +import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry' + +var abilityDelegator = undefined +var abilityDelegatorArguments = undefined + +function translateParamsToString(parameters) { + const keySet = new Set([ + '-s class', '-s notClass', '-s suite', '-s it', + '-s level', '-s testType', '-s size', '-s timeout', + '-s dryRun' + ]) + let targetParams = ''; + for (const key in parameters) { + if (keySet.has(key)) { + targetParams = `${targetParams} ${key} ${parameters[key]}` + } + } + return targetParams.trim() +} + +async function onAbilityCreateCallback() { + console.log("onAbilityCreateCallback"); +} + +async function addAbilityMonitorCallback(err: any) { + console.info("addAbilityMonitorCallback : " + JSON.stringify(err)) +} + +export default class OpenHarmonyTestRunner implements TestRunner { + constructor() { + } + + onPrepare() { + console.info("OpenHarmonyTestRunner OnPrepare ") + } + + async onRun() { + console.log('OpenHarmonyTestRunner onRun run') + abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments() + abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator() + var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility' + let lMonitor = { + abilityName: testAbilityName, + onAbilityCreate: onAbilityCreateCallback, + }; + abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback) + var cmd = 'aa start -d 0 -a com.example.DeviceAttest.MainAbility' + ' -b ' + abilityDelegatorArguments.bundleName + cmd += ' '+translateParamsToString(abilityDelegatorArguments.parameters) + var debug = abilityDelegatorArguments.parameters["-D"] + if (debug == 'true') + { + cmd += ' -D' + } + console.info('cmd : '+cmd) + abilityDelegator.executeShellCommand(cmd, + (err: any, d: any) => { + console.info('executeShellCommand : err : ' + JSON.stringify(err)); + console.info('executeShellCommand : data : ' + d.stdResult); + console.info('executeShellCommand : data : ' + d.exitCode); + }) + console.info('OpenHarmonyTestRunner onRun end') + } +}; \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/ets/test/List.test.ets b/device_attest/deviceAttest/entry/src/main/ets/test/List.test.ets new file mode 100644 index 000000000..89dcbac27 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/test/List.test.ets @@ -0,0 +1,19 @@ +/* + * Copyright (c) 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. + */ +import deviceAttestInfoTest from './deviceAttestInfo.test' + +export default function testsuite(context, windowStage, abilityStorage) { + deviceAttestInfoTest(context, windowStage, abilityStorage) +} diff --git a/device_attest/deviceAttest/entry/src/main/ets/test/deviceAttestInfo.test.ets b/device_attest/deviceAttest/entry/src/main/ets/test/deviceAttestInfo.test.ets new file mode 100644 index 000000000..47d590e74 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/ets/test/deviceAttestInfo.test.ets @@ -0,0 +1,119 @@ +/* + * Copyright (c) 2022 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. + */ +import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from "@ohos/hypium" +import deviceAttest from '@ohos.deviceAttest'; + +export default function deviceAttestInfoTest(context, windowStage, abilityStorage) { + describe('deviceAttestInfoTest', function () { + console.info('describe deviceAttestInfoTest start!!!'); + beforeAll(function () { + console.info('before all'); + }) + beforeEach(function () { + console.info('before each'); + }) + afterEach(async function (done) { + console.info('afterEach'); + done(); + }) + afterAll(function () { + console.info('afterAll'); + }) + + /** + * @tc.number SUB_GRAPHIC_ENUMCOLORSPACE_JSAPI_001 + * @tc.name Test function getAttestStatus() : Promise + * @tc.desc 202 - Not System App. Interface caller is not a system app. + */ + it('SUB_GRAPHIC_ENUMCOLORSPACE_JSAPI_001', 0, async function (done) { + console.info('test the enum value of attestResultInfo begin'); + try{ + deviceAttest.getAttestStatus().then(attestResultInfo => { + console.info("!!!====>[FormComponent]1:data====>" + JSON.stringify(attestResultInfo)); + expect(attestResultInfo.authResult).assertEqual(""); + expect(attestResultInfo.softwareResult).assertEqual(""); + expect(attestResultInfo.softwareResultDetail).assertEqual(""); + expect(attestResultInfo.ticket).assertEqual(""); + done(); + } ,err => { + console.info("!!!====>[FormComponent]1:error_1====>" + JSON.stringify(err)); + expect(err.code == 202).assertTrue(); + done(); + }) + } catch(err) { + console.info("!!!====>[FormComponent]1:error_2====>" + JSON.stringify(err)); + expect(err.code == 202).assetTrue(); + done(); + } + }) + + /** + * @tc.number SUB_GRAPHIC_ENUMCOLORSPACE_JSAPI_002 + * @tc.name Test function getAttestStatus(callback: AsyncCallback) : void + * @tc.desc 202 - Not System App. Interface caller is not a system app. + */ + it('SUB_GRAPHIC_ENUMCOLORSPACE_JSAPI_002', 0, async function (done) { + console.info('test the enum value of attestResultInfo begin'); + try{ + deviceAttest.getAttestStatus(async (err, attestResultInfo) => { + if(err){ + console.info("!!!====>[FormComponent]2:error_1====>" + JSON.stringify(err)); + expect(err.code == 202).assertTrue(); + } + else{ + console.info("!!!====>[FormComponent]2:data====>" + JSON.stringify(attestResultInfo)); + expect(attestResultInfo.authResult).assertEqual(""); + expect(attestResultInfo.softwareResult).assertEqual(""); + expect(attestResultInfo.softwareResultDetail).assertEqual(""); + expect(attestResultInfo.ticket).assertEqual(""); + } + done(); + }); + } catch(err) { + console.info("!!!====>[FormComponent]2:error_2====>" + JSON.stringify(err)); + expect(err.code == 202).assetTrue(); + done(); + } + }) + + /** + * @tc.number SUB_GRAPHIC_ENUMCOLORSPACE_JSAPI_003 + * @tc.name Test function getAttestStatusSync() : AttestResultInfo; + * @tc.desc 202 - Not System App. Interface caller is not a system app. + */ + it('SUB_GRAPHIC_ENUMCOLORSPACE_JSAPI_003', 0, async function (done) { + console.info('test the enum value of attestResultInfo begin'); + try{ + let attestResultInfo = deviceAttest.getAttestStatusSync(); + if(attestResultInfo != null){ + console.info("!!!====>[FormComponent]3:data====>" + JSON.stringify(attestResultInfo)); + expect(attestResultInfo.authResult).assertEqual(""); + expect(attestResultInfo.softwareResult).assertEqual(""); + expect(attestResultInfo.softwareResultDetail).assertEqual(""); + expect(attestResultInfo.ticket).assertEqual(""); + } + else{ + console.info("!!!====>[FormComponent]3:error_1====>"); + expect().assetTrue(); + } + done(); + } catch(err) { + console.info("!!!====>[FormComponent]3:error_2====>" + JSON.stringify(err)); + expect(err.code).assertEqual(202); + done(); + } + }) + }) +} \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/module.json b/device_attest/deviceAttest/entry/src/main/module.json new file mode 100644 index 000000000..72def68ca --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/module.json @@ -0,0 +1,41 @@ +{ + "module": { + "name": "phone", + "type": "entry", + "srcEntrance": "./ets/Application/AbilityStage.ts", + "description": "$string:phone_entry_dsc", + "mainElement": "MainAbility", + "deviceTypes": [ + "tablet", + "default" + ], + "deliveryWithInstall": true, + "installationFree": false, + "uiSyntax": "ets", + "pages": "$profile:main_pages", + "metadata": [ + { + "name": "ArkTSPartialUpdate", + "value": "false" + } + ], + "abilities": [{ + "name": "com.example.DeviceAttest.MainAbility", + "srcEntrance": "./ets/MainAbility/MainAbility.ts", + "description": "$string:phone_entry_main", + "icon": "$media:icon", + "label": "$string:entry_label", + "visible": true, + "orientation": "portrait", + "skills": [{ + "actions": [ + "action.system.home" + ], + "entities": [ + "entity.system.home" + ] + }] + }] + + } +} \ No newline at end of file diff --git a/device_attest/deviceAttest/entry/src/main/resources/base/element/string.json b/device_attest/deviceAttest/entry/src/main/resources/base/element/string.json new file mode 100644 index 000000000..2a61b2e5b --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/resources/base/element/string.json @@ -0,0 +1,32 @@ +{ + "string": [ + { + "name": "phone_entry_dsc", + "value": "i am an entry for phone" + }, + { + "name": "phone_entry_main", + "value": "the phone entry ability" + }, + { + "name": "entry_label", + "value": "ActsColorSpaceManagerTest" + }, + { + "name": "form_description", + "value": "my form" + }, + { + "name": "serviceability_description", + "value": "my whether" + }, + { + "name": "description_application", + "value": "demo for test" + }, + { + "name": "app_name", + "value": "Demo" + } + ] +} diff --git a/device_attest/deviceAttest/entry/src/main/resources/base/media/icon.png b/device_attest/deviceAttest/entry/src/main/resources/base/media/icon.png new file mode 100644 index 0000000000000000000000000000000000000000..474a55588fd7216113dd42073aadf254d4dba023 GIT binary patch literal 15458 zcmV-oJe|XdP)Px#1ZP1_K>z@;j|==^1poj532;bRa{vGi!~g&e!~vBn4jTXfJNHRMK~#8N)t$?W zZ`*d)f6uD@IOn2&LJ;lP6@!gHh#>Y1!r&0HL_gDqb&`3X(Z=GaQp8SP` z92In5!tr>lHv4nxKS1{J@p1P!+F4$_JksuYcRrnVr_*tFKEi|jF}%m8r`_Y_l6p^% z@+LnCznqL`mDBrry9$FzRWuxkQF=}GpwhbiR|yW zmfjQNx4tFelhpeM=s1qPZ}7VBtuHUqIh+_+IvN7$>(jXIa?55SEAd6rfw_FG^Ciq> zUAOb*d;6XH7UwzzrTnE1QtLJmPK4||=GS#JMbf8dX;2o^T+5qYx7QF%t86tY^M!6V zrngTY z1udv}ju^g5nNRXGgh*Bp3Mrd$sWa|p#az3e^Glh~4OYDwx?a*KW72*IFc`5a72{iM zp*N~%>#A7GyQ5CGc@5sreOI4Vr-jh46-ty$UgtlNS4u^>BKcJpW(i@*S9!$UCqmcd z(U6LQxPK-@LYcI@ROQlUqYfv9)@pP1D z^PGd_#Bn=j?h;(A2YP*^zO{q!-impmO*sshM)pxC{aRnxpLI$OVz(ElViw;?d~N$q$^VbIP>sa0q0)N~6iq!!fI>IcRGDdADCq?$^K61=g>C{IY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1;c6}R8!%NJeZ{_C?c;3;(Bhvgl9`1TUrhJs+)3eHTVN^Wtf9v1;w`bk-!U80# zPb4Nai`;Q4VyWJmBm(HGVb%x!$o9g(m z@BNm8)L5LW41ks^%nDsO9dc#n{!ihj%?OK8jS5s)q|ox6AsyuMaEws?(61<4>Dl&% z(AowWE}sZbd2$Fpd3X!W{44-|eRU%5z)~*gA?R**Vyu2$E5~BWM~PgBBq$=kqGE67 z`@|=dDkKs@MXyRk(q=Sb__5!7i&kaqd|~>q`yW64akf!;YC=W70<8l5tW13-+~|Y; zkOj7m+O z!5pPf&u5hW8I_=fD zD*;20N{)BIOQ{tj;NRl5w-|ch2}M5c{wK!f>CfqKoBq&WEM66PqkaN5`Y)t8TRI`--F?$f7FyF2*vpx(dgmuRWV_Q&1- Y0jIQKqpXab7ytkO07*qoM6N<$f;yQ2zW@LL literal 0 HcmV?d00001 diff --git a/device_attest/deviceAttest/entry/src/main/resources/base/profile/main_pages.json b/device_attest/deviceAttest/entry/src/main/resources/base/profile/main_pages.json new file mode 100644 index 000000000..ceb075cd8 --- /dev/null +++ b/device_attest/deviceAttest/entry/src/main/resources/base/profile/main_pages.json @@ -0,0 +1,5 @@ +{ + "src": [ + "MainAbility/pages/index/index" + ] +} \ No newline at end of file diff --git a/device_attest/deviceAttest/signature/openharmony_sx.p7b b/device_attest/deviceAttest/signature/openharmony_sx.p7b new file mode 100644 index 0000000000000000000000000000000000000000..83337f8f97fa9e6dccc2be7b799fc9be44ffb741 GIT binary patch literal 3437 zcmcgvYg7|w8YUM&geVpjbyYA@aMi#!xj=%o?MyPc!6YOkKrk*&lF0>rxhvqLa@*sAS`ZghaXB1F0Mb*^=Cx=!1dq?E>W!aft8}c$i=vcrYk(`NDL_=ZMgW{RT3q zaGj5&2~P-5c-h1z-0ySw=w@N*d?88EA_w87LJ4Ftg;ZWF6U*c?`~0|@CPJ*cSgw$k zNLcrRnLAH2<*|JxKUXYQ^6SG@iclH>Wvj9 zlL}_6Fs8wx${4I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A$uoY* zPZIJRNqnrhyLokkVDb7J0{yYxY1DU4I8ZjfOO(F8>CiQs?aZ8Yn_rFJ|LClZuUUp^ zT7zqlZM)iUb=5tvbYzU^cD}Xh&zezN-Vj_mux;~$x-k#(bC!j=bALX`6t?LWmZWOF z--3Ww!N>$rvJ%8e20ZpLlu4YFK}^an&D`|f_}6-pjJwXX7VK@UWk!54w0k^H5^!+= zQ_B=UU)*JOyu7yUe9it2Z}W?V}$%OjlS zQO^L6CKI2`9*X2Sc5jdvK{APWFpm=E^HIcSP-x1A?~b>+|-{$hmjz#O0OuMb<4&fDaL;r*h=~;Mh~eZO943^Ckg; z3j!B^Az%CsedF~H?v;A$b{;R@aOH63@$*?%7PvEwJzDG6OBRjycIy6p?po)VFRz^+ z#fsIjVHC5oG_=XwnJ;?qVa=|iYu02Q@z3fW8=v^_txJX#p`Mlam7tAY;W;VYIO{?o z6z9M!$!4<`1JLkX+Bk5c4!(o5`@pzIcaSt5#K!)2bK!uAkBqcrXe4_mN`M3u1G%h3 zCa(oWkE47@$j|-iU?nQio&CUf@+JDh=wW})JhI&X=|$K0y6-0z%s$Xo28KU6$+>(D zK)F+rdRJ%M7H0&o=BeSbSzD7|JJ?)G^=zCq>8rfPmN}B%L)_eC+3`CkX3RbK=7o1g bIG0Ag&A;IMapTeSS&LWAcdyI8|Ji>5gM?I@ literal 0 HcmV?d00001 diff --git a/test_packages.gni b/test_packages.gni index 62f36daa1..51f2e42fe 100644 --- a/test_packages.gni +++ b/test_packages.gni @@ -49,6 +49,7 @@ _all_test_packages = [ "${ACTS_ROOT}/applications:applications", "${ACTS_ROOT}/wukong:wukong", "${ACTS_ROOT}/validator:validator", + "${ACTS_ROOT}/device_attest:device_attest", ] _all_test_packages_ivi = [ -- GitLab