提交 0d2e79f3 编写于 作者: 华华小仙女

Merge branch 'monthly_20221018' of https://gitee.com/huahua-fairy/xts_acts into monthly_20221018

......@@ -44,7 +44,7 @@ export default class MainAbility extends Ability {
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
cmd = 'aa test -b com.example.aacommandrelyhap -m entry_test -s class ACTS_AACommand_01_3#ACTS_AACo' +
cmd = 'aa test -b com.example.aacommandrelyhap -m entry_test -s class AACommandPrintOneTest#ACTS_AACo' +
'mmand_print_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0100 - executeShellCommand: start ')
......@@ -52,13 +52,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult3 = data.stdResult;
console.log('ACTS_AACommand_print_01_0100 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0100', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AAComm' +
'and_print_01_0200 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0200 - executeShellCommand: start ')
......@@ -66,13 +65,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0200 stdResult = ' + data.stdResult)
globalThis.stdResult4 = data.stdResult;
console.log('ACTS_AACommand_print_01_0200 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0200', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_' +
'AACommand_print_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0300 - executeShellCommand: start ')
......@@ -80,13 +78,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0300 stdResult = ' + data.stdResult)
globalThis.stdResult5 = data.stdResult;
console.log('ACTS_AACommand_print_01_0300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0300', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComma' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AAComma' +
'nd_print_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0400 - executeShellCommand: start ')
......@@ -94,13 +91,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult6 = data.stdResult;
console.log('ACTS_AACommand_print_01_0400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0400', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AAComm' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AAComm' +
'and_print_01_0500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0500 - executeShellCommand: start ')
......@@ -108,13 +104,12 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0500 stdResult = ' + data.stdResult)
globalThis.stdResult7 = data.stdResult;
console.log('ACTS_AACommand_print_01_0500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0500', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ACTS_AACommand_01_3#ACTS_AA' +
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class AACommandPrintOneTest#ACTS_AA' +
'Command_print_01_0600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0600 - executeShellCommand: start ')
......@@ -122,42 +117,38 @@ export default class MainAbility extends Ability {
console.log('ACTS_AACommand_print_01_0600 stdResult = ' + data.stdResult)
globalThis.stdResult8 = data.stdResult;
console.log('ACTS_AACommand_print_01_0600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0600', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_print_01_0700 -s unittest OpenHarmonyTestRunner'
'AACommandPrintOneTest#ACTS_AACommand_print_01_0700 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0700 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0700 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0700 stdResult = ' + data.stdResult)
globalThis.stdResult9 = data.stdResult;
console.log('ACTS_AACommand_print_01_0700 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0700', this.context);
})
await sleep(4000)
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_print_01_0800 -s unittest OpenHarmonyTestRunner'
'class AACommandPrintOneTest#ACTS_AACommand_print_01_0800 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_print_01_0800 - executeShellCommand: start ')
console.log('ACTS_AACommand_print_01_0800 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_print_01_0800 stdResult = ' + data.stdResult)
globalThis.stdResult10 = data.stdResult;
console.log('ACTS_AACommand_print_01_0800 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_print_01_0800', this.context);
})
setTimeout(() => {
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}, 5000)
}, 6000)
}
onDestroy() {
......
......@@ -33,6 +33,12 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
......@@ -13,13 +13,10 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import { describe, it } from '@ohos/hypium'
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export default function abilityTest() {
describe('ACTS_AACommand_01_3', function () {
describe('AACommandPrintTest', function () {
/**
* @tc.number: ACTS_AACommand_printSync_01_0100
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid,
......@@ -27,7 +24,8 @@ export default function abilityTest() {
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_printSync_01_0100', 0, async function (done) {
it('ACTS_AACommand_printSync_01_0100', 0, async function (done) {
done()
console.log("ACTS_AACommand_printSync_01_0100 start ====> " )
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.printSync(msg);
......@@ -37,7 +35,6 @@ export default function abilityTest() {
console.log("ACTS_AACommand_printSync_01_0100 finishTest test end ========> callback " )
console.log("ACTS_AACommand_printSync_01_0100 finishTest test end " +
"========> callback data: "+JSON.stringify(data))
done()
})
})
......@@ -49,6 +46,7 @@ export default function abilityTest() {
* the test command.
*/
it('ACTS_AACommand_printSync_01_0200', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
......@@ -65,7 +63,6 @@ export default function abilityTest() {
var finishmsg = 'ACTS_AACommand_printSync_01_0200 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_printSync_01_0200 print test end ========> callback " )
done()
})
})
......@@ -77,6 +74,7 @@ export default function abilityTest() {
* the test command.
*/
it('ACTS_AACommand_printSync_01_0300', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
......@@ -94,7 +92,6 @@ export default function abilityTest() {
var finishmsg = 'ACTS_AACommand_printSync_01_0300 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_printSync_01_0300 print test end ========> callback " )
done()
})
})
......@@ -106,12 +103,12 @@ export default function abilityTest() {
* the test command.
*/
it('ACTS_AACommand_printSync_01_0400', 0, async function (done) {
done()
globalThis.abilityDelegator.printSync(null);
console.log("ACTS_AACommand_printSync_01_0300 printSync end ====> " )
var finishmsg = 'ACTS_AACommand_printSync_01_0400 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_printSync_01_0400 print test end ========> callback " )
done()
})
})
})
......
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import abilityTest from './Ability.test'
import abilityTest from './AACommandPrint.test'
export default function testsuite() {
abilityTest()
......
......@@ -45,59 +45,54 @@ export default class MainAbility extends Ability {
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
cmd = 'aa test -b com.example.aacommandprintsync -m entry_test -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0100 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult1 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0100 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0100', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0200 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0200 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0200 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0200 stdResult = ' + data.stdResult)
globalThis.stdResult2 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0200 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0200', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0300 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0300 stdResult = ' + data.stdResult)
globalThis.stdResult3 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0300 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0300', this.context);
})
await sleep(3000)
cmd = 'aa test -m entry_test -b com.example.aacommandprintsync -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_printSync_01_0400 -s unittest OpenHarmonyTestRunner'
'AACommandPrintTest#ACTS_AACommand_printSync_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_printSync_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_printSync_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult4 = data.stdResult;
console.log('ACTS_AACommand_printSync_01_0400 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_printSync_01_0400', this.context);
})
setTimeout(() => {
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}, 5000)
}, 6000)
}
onDestroy() {
......
......@@ -33,6 +33,12 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
/*
* 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, it } from '@ohos/hypium'
export default function abilityTest() {
describe('AACommandPrintOneTest', function () {
/**
* @tc.number: ACTS_AACommand_print_01_0100
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. The print information includes Chinese, special characters, etc.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0100', 0, async function (done) {
console.log("ACTS_AACommand_print_01_0100 start ====> " )
done()
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.print(msg,(err,data)=>{
console.log("ACTS_AACommand_print_01_0100 print test end ========> callback " )
console.log("ACTS_AACommand_print_01_0100 print test end ========> callback err: "+JSON.stringify(err) )
console.log("ACTS_AACommand_print_01_0100 print test end ========> callback data: "+JSON.stringify(data))
})
var finishmsg = 'ACTS_AACommand_print_01_0100 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then((data)=>{
console.log("ACTS_AACommand_print_01_0100 finishTest test end ========> callback " )
console.log("ACTS_AACommand_print_01_0100 finishTest test end ========> callback data: "+JSON.stringify(data))
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0200
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. The length of the print message is 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0200', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'aaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
globalThis.abilityDelegator.print(msg,()=>{
console.log("print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0200 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0200 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0300
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. The length of the print message is greater than 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0300', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae' +
'fffffffffff'
globalThis.abilityDelegator.print(msg,()=>{
console.log("print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0300 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0300 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0400
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in AsyncCallback mode. print information is null.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0400', 0, async function (done) {
done()
globalThis.abilityDelegator.print(null,()=>{
console.log("print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0400 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0400 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0500
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. The print information includes Chinese, special characters, etc.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0500', 0, async function (done) {
done()
var msg = '测试日志!@#$%^&*()_+QWE{}|?><Fafq3146'
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0500 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0500 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0500 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0600
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. The length of the print message is 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally
* through the test command.
*/
it('ACTS_AACommand_print_01_0600', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae'
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0600 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0600 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0600 2 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0700
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. The length of the print message is greater than 1000 characters.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally through
* the test command.
*/
it('ACTS_AACommand_print_01_0700', 0, async function (done) {
done()
var msg = '0callbackaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'1aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'2aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'3aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'4aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'5aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'6aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'7aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'8aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa' +
'9aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaae' +
'fffffffffff'
globalThis.abilityDelegator.print(msg).then(()=>{
console.log("ACTS_AACommand_print_01_0700 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0700 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0700 2 print test end ========> callback " )
})
})
/**
* @tc.number: ACTS_AACommand_print_01_0800
* @tc.name: The -b, -p, -s, -w and other parameters of the test command are valid, and the print interface is
* called in Promise mode. print information is null.
* @tc.desc: Verify that the test framework can be started normally and the logs can be output normally
* through the test command.
*/
it('ACTS_AACommand_print_01_0800', 0, async function (done) {
done()
globalThis.abilityDelegator.print("").then(()=>{
console.log("ACTS_AACommand_print_01_0800 print test end ========> callback " )
})
var finishmsg = 'ACTS_AACommand_print_01_0800 end'
globalThis.abilityDelegator.finishTest(finishmsg, 1).then(()=>{
console.log("ACTS_AACommand_print_01_0800 2 print test end ========> callback " )
})
})
})
};
......@@ -13,8 +13,10 @@
* limitations under the License.
*/
import abilityTest from './Ability.test'
import aaCommandTest from './AACommand.test'
import aaCommandPrintOneTest from './AACommandPrintOne.test'
export default function testsuite() {
abilityTest()
aaCommandTest()
aaCommandPrintOneTest()
}
\ No newline at end of file
......@@ -13,7 +13,7 @@
* limitations under the License.
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import { describe, it, expect } from '@ohos/hypium'
import AbilityDelegatorRegistry from '@ohos.application.abilityDelegatorRegistry'
export default function abilityTest() {
describe('ACTS_AACommand_01_3', function () {
......
......@@ -46,20 +46,19 @@ export default class MainAbility extends Ability {
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0700 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0700 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0700 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0700 stdResult = ' + data.stdResult)
globalThis.stdResult1 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0700 - executeShellCommand: end ')
await startAbilityTest('ACTS_AACommand_finish_01_0700', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0700 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0700 : data : ' + JSON.stringify(data));
globalThis.stdResult2 = data["stdResult"];
......@@ -69,21 +68,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0400 -s unittest OpenHarmonyTestRunner'
'AACommandTest#ACTS_AACommand_finish_01_0400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0400 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0400 stdResult = ' + data.stdResult)
globalThis.stdResult11 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0400', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0700 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0700 : data : ' + JSON.stringify(data));
globalThis.stdResult12 = data["stdResult"];
......@@ -93,21 +91,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0100 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0100 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0100 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0100 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0100 stdResult = ' + data.stdResult)
globalThis.stdResult13 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0100 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0100', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0700 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0700 : data : ' + JSON.stringify(data));
globalThis.stdResult14 = data["stdResult"];
......@@ -117,21 +114,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s class ' +
'ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0500 -s unittest OpenHarmonyTestRunner'
'AACommandTest#ACTS_AACommand_finish_01_0500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0500 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0500 stdResult = ' + data.stdResult)
globalThis.stdResult15 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0500', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0500 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0500 : data : ' + JSON.stringify(data));
globalThis.stdResult16 = data["stdResult"];
......@@ -141,21 +137,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0600 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0600 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0600 stdResult = ' + data.stdResult)
globalThis.stdResult17 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0600', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0600 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0600 : data : ' + JSON.stringify(data));
globalThis.stdResult18 = data["stdResult"];
......@@ -165,21 +160,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap -s ' +
'class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0900 -s unittest OpenHarmonyTestRunner'
'class AACommandTest#ACTS_AACommand_finish_01_0900 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0900 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0900 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0900 stdResult = ' + data.stdResult)
globalThis.stdResult19 = data.stdResult;
console.log('ACTS_AACommand_finish_01_0900 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0900', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0900 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0900 : data : ' + JSON.stringify(data));
globalThis.stdResult20 = data["stdResult"];
......@@ -189,21 +183,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1300 -s unittest OpenHarmonyTestRunner'
'-s class AACommandTest#ACTS_AACommand_finish_01_1300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1300 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1300 stdResult = ' + data.stdResult)
globalThis.stdResult23 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1300', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1300 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1300 : data : ' + JSON.stringify(data));
globalThis.stdResult24 = data["stdResult"];
......@@ -213,21 +206,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1400 -s unittest OpenHarmonyTestRunner'
'-s class AACommandTest#ACTS_AACommand_finish_01_1400 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1400 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1400 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1400 stdResult = ' + data.stdResult)
globalThis.stdResult25 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1400 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1400', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1400 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1400 : data : ' + JSON.stringify(data));
globalThis.stdResult26 = data["stdResult"];
......@@ -237,21 +229,20 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
'-s class AACommandTest#ACTS_AACommand_finish_01_1500 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1500 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1500 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1500 stdResult = ' + data.stdResult)
globalThis.stdResult27 = data.stdResult;
console.log('ACTS_AACommand_finish_01_1500 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1500', this.context);
})
await sleep(4000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1500 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1500 : data : ' + JSON.stringify(data));
globalThis.stdResult28 = data["stdResult"];
......@@ -261,43 +252,41 @@ export default class MainAbility extends Ability {
await sleep(2000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap ' +
'-s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_0300 -s unittest OpenHarmonyTestRunner'
'-s class AACommandTest#ACTS_AACommand_finish_01_0300 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_0300 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_0300 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_0300 stdResult = ' + data.stdResult)
console.log('ACTS_AACommand_finish_01_0300 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_0300', this.context);
})
await sleep(3000)
await sleep(2000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_0300 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_0300 : data : ' + JSON.stringify(data));
globalThis.stdResult30 = data["stdResult"];
console.info('ACTS_AACommand_finish_01_0300 end');
})
await sleep(2000)
await sleep(4000)
cmd = 'aa test -m entry_test -b com.example.aacommandrelyhap' +
' -s class ACTS_AACommand_01_3#ACTS_AACommand_finish_01_1600 -s unittest OpenHarmonyTestRunner'
' -s class AACommandTest#ACTS_AACommand_finish_01_1600 -s unittest OpenHarmonyTestRunner'
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.log('ACTS_AACommand_finish_01_1600 - executeShellCommand: start ')
console.log('ACTS_AACommand_finish_01_1600 start err: ' + JSON.stringify(err))
console.log('ACTS_AACommand_finish_01_1600 stdResult = ' + data.stdResult)
console.log('ACTS_AACommand_finish_01_1600 - executeShellCommand: end')
await startAbilityTest('ACTS_AACommand_finish_01_1600', this.context);
})
await sleep(3000)
await sleep(2000)
cmd = 'aa dump -a'
abilityDelegator.executeShellCommand(cmd, (err, data) => {
abilityDelegator.executeShellCommand(cmd, async (err, data) => {
console.info('ACTS_AACommand_finish_01_1600 : err : ' + JSON.stringify(err));
console.info('ACTS_AACommand_finish_01_1600 : data : ' + JSON.stringify(data));
globalThis.stdResult34 = data["stdResult"];
......@@ -306,7 +295,7 @@ export default class MainAbility extends Ability {
setTimeout(() => {
Hypium.hypiumTest(abilityDelegator, abilityDelegatorArguments, testsuite)
}, 5000)
}, 6000)
}
onDestroy() {
......
......@@ -33,6 +33,12 @@
}
]
}
],
"requestPermissions": [
{
"name":"ohos.permission.START_ABILITIES_FROM_BACKGROUND",
"reason":"need use ohos.permission.START_ABILITIES_FROM_BACKGROUND"
}
]
}
}
\ No newline at end of file
......@@ -84,6 +84,7 @@ export default function OnAndOffScreenTest() {
})
if (!status) {
await sleep(500)
let cmd = "uinput -K -d 18 -u 18";
await executeShellCommand(cmd, TAG1);
await slideScreen(TAG1);
......@@ -463,6 +464,7 @@ export default function OnAndOffScreenTest() {
}
if (data.event == onForeground2) {
await sleep(500)
let cmd = "uinput -K -d 18 -u 18";
await executeShellCommand(cmd, TAG);
}
......@@ -565,6 +567,7 @@ export default function OnAndOffScreenTest() {
}
if (data.event == onForeground2 && !flag) {
await sleep(500)
let cmd = "uinput -K -d 18 -u 18";
await executeShellCommand(cmd, TAG);
flag = true;
......@@ -580,6 +583,7 @@ export default function OnAndOffScreenTest() {
}
if (data.event == onBackground2) {
await sleep(500)
let cmd = "uinput -K -d 18 -u 18";
await executeShellCommand(cmd, TAG);
await slideScreen(TAG);
......
......@@ -19,6 +19,7 @@ import bundle from '@ohos.bundle';
var TAG1 = "Fa:SupportFunction:MainAbility3:";
var listPush1 = "Fa_SupportFunction_MainAbility3_";
var lifeList = [];
let setDisplayOrientation1 = 0;
export default {
onCreate() {
console.log(TAG1 + 'onCreate');
......@@ -39,6 +40,11 @@ export default {
ability_featureAbility.getContext().setDisplayOrientation(orientation, (error, setDisplayOrientation) => {
console.log(TAG1 + "setDisplayOrientation data = " + JSON.stringify(setDisplayOrientation));
console.log(TAG1 + "setDisplayOrientation error = " + JSON.stringify(error));
if (setDisplayOrientation == undefined) {
setDisplayOrientation1 = 1
} else {
console.log(`${TAG1} setDisplayOrientation callBack is error: ${JSON.stringify(setDisplayOrientation)}`);
}
ability_featureAbility.getContext().getDisplayOrientation((error, displayOrientationAfter) => {
console.log(TAG1 + "getDisplayOrientation2 data = " + JSON.stringify(displayOrientationAfter));
......@@ -49,7 +55,7 @@ export default {
displayOrientationBefore: displayOrientationBefore,
displayOrientationAfter: displayOrientationAfter,
lifeList: lifeList,
setDisplayOrientation: setDisplayOrientation
setDisplayOrientation: setDisplayOrientation1
}
}
commonEvent.publish(listPush1 + "onActive", options, (err) => {
......
......@@ -33,7 +33,7 @@ export default {
let displayOrientationBefore = undefined;
let displayOrientationAfter = undefined;
let setDisplayOrientation = undefined;
let setDisplayOrientation = 0;
let orientation = undefined;
let number = undefined;
let wantNum = undefined;
......@@ -116,7 +116,11 @@ export default {
await ability_featureAbility.getContext().setDisplayOrientation(orientation).then((data) => {
console.log(TAG1 + "setShowOnLockScreen data = " + JSON.stringify(data));
setDisplayOrientation = data;
if (data == undefined) {
setDisplayOrientation = 1
} else {
console.log(`${TAG1} setDisplayOrientation callBack is error: ${JSON.stringify(data)}`);
}
}).catch((error) => {
console.log(TAG1 + "setShowOnLockScreen error = " + JSON.stringify(error));
})
......
......@@ -33,7 +33,7 @@ export default {
let displayOrientationBefore = undefined;
let displayOrientationAfter = undefined;
let setDisplayOrientation = undefined;
let setDisplayOrientation = 0;
let orientation = bundle.DisplayOrientation.FOLLOW_RECENT;
await ability_featureAbility.getContext().getDisplayOrientation().then((data) => {
......@@ -45,7 +45,11 @@ export default {
await ability_featureAbility.getContext().setDisplayOrientation(orientation).then((data) => {
console.log(TAG1 + "setShowOnLockScreen data = " + JSON.stringify(data));
setDisplayOrientation = data;
if (data == undefined) {
setDisplayOrientation = 1
} else {
console.log(`${TAG1} setDisplayOrientation callBack is error: ${JSON.stringify(data)}`);
}
}).catch((error) => {
console.log(TAG1 + "setShowOnLockScreen error = " + JSON.stringify(error));
})
......
......@@ -33,7 +33,7 @@ export default {
let displayOrientationBefore = undefined;
let displayOrientationAfter = undefined;
let setDisplayOrientation = undefined;
let setDisplayOrientation = 0;
let orientation = bundle.DisplayOrientation.FOLLOW_RECENT;
await ability_featureAbility.getContext().getDisplayOrientation().then((data) => {
......@@ -45,7 +45,11 @@ export default {
await ability_featureAbility.getContext().setDisplayOrientation(orientation).then((data) => {
console.log(TAG1 + "setShowOnLockScreen data = " + JSON.stringify(data));
setDisplayOrientation = data;
if (data == undefined) {
setDisplayOrientation = 1
} else {
console.log(`${TAG1} setDisplayOrientation callBack is error: ${JSON.stringify(data)}`);
}
}).catch((error) => {
console.log(TAG1 + "setShowOnLockScreen error = " + JSON.stringify(error));
})
......
......@@ -33,7 +33,7 @@ export default {
let displayOrientationBefore = undefined;
let displayOrientationAfter = undefined;
let setDisplayOrientation = undefined;
let setDisplayOrientation = 0;
let orientation = bundle.DisplayOrientation.FOLLOW_RECENT;
await ability_featureAbility.getContext().getDisplayOrientation().then((data) => {
......@@ -45,7 +45,11 @@ export default {
await ability_featureAbility.getContext().setDisplayOrientation(orientation).then((data) => {
console.log(TAG1 + "setShowOnLockScreen data = " + JSON.stringify(data));
setDisplayOrientation = data;
if (data == undefined) {
setDisplayOrientation = 1
} else {
console.log(`${TAG1} setDisplayOrientation callBack is error: ${JSON.stringify(data)}`);
}
}).catch((error) => {
console.log(TAG1 + "setShowOnLockScreen error = " + JSON.stringify(error));
})
......
......@@ -14,6 +14,7 @@
*/
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import abilityManager from '@ohos.app.ability.abilityManager';
import errorManager from '@ohos.app.ability.errorManager';
function sleep(time) {
......@@ -78,5 +79,99 @@ export default function ApiCoverTest() {
done();
}
});
/*
* @tc.number SUB_AA_GetTopAbility_0100
* @tc.name Test getTopAbility.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_GetTopAbility_0100', 0, async function (done) {
try {
await abilityManager.getTopAbility().then((data)=>{
expect(true).assertTrue();
done();
}).catch((err)=>{
expect().assertFail()
done();
})
} catch (error) {
expect().assertFail()
done();
}
});
/*
* @tc.number SUB_AA_GetAbilityRunningInfo_0100
* @tc.name Test getAbilityRunningInfo.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_GetAbilityRunningInfo_0100', 0, async function (done) {
try {
await abilityManager.getAbilityRunningInfos().then((data)=>{
expect(true).assertTrue();
done();
}).catch((err)=>{
expect().assertFail()
done();
})
} catch (error) {
expect().assertFail()
done();
}
});
/*
* @tc.number SUB_AA_GetExtensionRunningInfos_0100
* @tc.name Test getExtensionRunningInfos.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_GetExtensionRunningInfos_0100', 0, async function (done) {
try {
let upperLimit = 1;
await abilityManager.getExtensionRunningInfos(upperLimit).then((data)=>{
expect(true).assertTrue();
done();
}).catch((err)=>{
expect().assertFail()
done();
})
} catch (error) {
expect().assertFail()
done();
}
});
/*
* @tc.number SUB_AA_UpdateConfiguration_0100
* @tc.name Test updateConfiguration.
* @tc.desc Function test
* @tc.level 3
*/
it('SUB_AA_UpdateConfiguration_0100', 0, async function (done) {
try {
// init for repeat test
var configInit = {
language: 'english'
}
await abilityManager.updateConfiguration(configInit, (err,data)=>{});
var config = {
language: 'chinese'
}
await abilityManager.updateConfiguration(config).then((data)=>{
expect(true).assertTrue();
done();
}).catch((err)=>{
expect().assertFail()
done();
})
} catch (error) {
expect().assertFail()
done();
}
});
})
}
}
\ No newline at end of file
......@@ -107,6 +107,9 @@
},
{
"name":"ohos.permission.START_INVISIBLE_ABILITY"
},
{
"name":"ohos.permission.UPDATE_CONFIGURATION"
}
]
}
......
......@@ -185,7 +185,7 @@ describe('ActsFeatureAbilityTest', function () {
expect(wantConstantNew.Action.INTENT_PARAMS_TITLE).assertEqual("ability.want.params.TITLE");
expect(wantConstantNew.Action.ACTION_FILE_SELECT).assertEqual("ohos.action.fileSelect");
expect(wantConstantNew.Action.PARAMS_STREAM).assertEqual("ability.params.stream");
expect(wantConstantNew.Action.ACTION_APP_ACCOUNT_AUTH).assertEqual("account.appAccount.action.auth");
expect(wantConstantNew.Action.ACTION_APP_ACCOUNT_AUTH).assertEqual("ohos.appAccount.action.auth");
expect(wantConstantNew.Entity.ENTITY_HOME).assertEqual("entity.system.home");
expect(wantConstantNew.Entity.ENTITY_DEFAULT).assertEqual("entity.system.default");
......
......@@ -17,6 +17,7 @@ import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from
const TIMEOUT = 5000;
const EACHTIMEOUT = 500;
const ERR_JS_CREDENTIAL_NOT_EXIST = 12300102;
export default function ActsAppAccountCredential() {
describe('ActsAppAccountCredential', function () {
function sleep(delay) {
......@@ -458,7 +459,7 @@ export default function ActsAppAccountCredential() {
expect(err).assertEqual(null);
appAccountManager.getCredential("account_name_1500", "credentialType15", (err)=>{
console.debug("====>getCredential ActsAppAccountCredential_1500 err:" + JSON.stringify(err));
expect(err.code == 12300019).assertEqual(true);
expect(err.code == ERR_JS_CREDENTIAL_NOT_EXIST).assertEqual(true);
appAccountManager.removeAccount("account_name_1500", (err)=>{
console.debug("====>delete Account ActsAppAccountCredential_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
......@@ -485,7 +486,7 @@ export default function ActsAppAccountCredential() {
}
catch(err){
console.debug("====>getCredential ActsAppAccountCredential_1600 err:" + JSON.stringify(err));
expect(err.code == 12300019).assertEqual(true);
expect(err.code == ERR_JS_CREDENTIAL_NOT_EXIST).assertEqual(true);
console.debug("====>delete account ActsAppAccountCredential_1600 start====");
await appAccountManager.removeAccount("account_name_1600");
console.debug("====>ActsAppAccountCredential_1600 end====");
......
/*
* 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.
*/
export const AccountErrCode = {
"ERR_JS_SUCCESS" : 0,
"ERR_JS_PERMISSION_DENIED" : 201,
"ERR_JS_PARAMETER_ERROR" : 401,
"ERR_JS_CAPABILITY_NOT_SUPPORTED" : 801,
"ERR_JS_SYSTEM_SERVICE_EXCEPTION" : 12300001,
"ERR_JS_INVALID_PARAMETER" : 12300002,
"ERR_JS_ACCOUNT_NOT_FOUND" : 12300003,
"ERR_JS_ACCOUNT_ALREADY_EXIST" : 12300004,
"ERR_JS_MULTI_USER_NOT_SUPPORT" : 12300005,
"ERR_JS_ACCOUNT_TYPE_NOT_SUPPORT" : 12300006,
"ERR_JS_ACCOUNT_NUMBER_REACH_LIMIT" : 12300007,
"ERR_JS_ACCOUNT_RESTRICTED" : 12300008,
"ERR_JS_ACCOUNT_ALREADY_ACTIVATED" : 12300009,
"ERR_JS_ACCOUNT_SERVICE_BUSY" : 12300010,
"ERR_JS_LISTENER_ALREADY_REGISTERED" : 12300011,
"ERR_JS_LISTENER_NOT_REGISTERED" : 12300012,
"ERR_JS_AUTH_CREDENTIAL_WRONG_ERROR" : 12300101,
"ERR_JS_CREDENTIAL_NOT_EXIST" : 12300102,
"ERR_JS_CREDENTIAL_INPUTER_ALREADY_EXIST" : 12300103,
"ERR_JS_CREDENTIAL_INPUTER_NOT_EXIST" : 12300104,
"ERR_JS_TRUST_LEVEL_NOT_SUPPORTED" : 12300105,
"ERR_JS_AUTH_TYPE_NOT_SUPPORTED" : 12300106,
"ERR_JS_AUTH_TYPE_NOT_FOUND" : 12300107,
"ERR_JS_SESSION_NOT_EXIST" : 12300108,
"ERR_JS_AUTH_CANCELLED" : 12300109,
"ERR_JS_AUTH_SERVICE_LOCKED" : 12300110,
"ERR_JS_AUTH_TIMEOUT" : 12300111,
"ERR_JS_AUTH_SERVICE_BUSY" : 12300112,
"ERR_JS_ACCOUNT_AUTHENTICATOR_NOT_EXIST" : 12300113,
"ERR_JS_ACCOUNT_AUTHENTICATOR_SERVICE_EXCEPTION" : 12300114,
"ERR_JS_INVALID_CONTEXT_ID" : 12300002,
"ERR_JS_APPLICATION_NOT_EXIST" : 12400001,
"ERR_JS_CUSTOM_DATA_NOT_FOUND" : 12400002,
"ERR_JS_CUSTOM_DATA_NUMBER_REACH_LIMIT" : 12400003,
"ERR_JS_TOKEN_NUMBER_REACH_LIMIT" : 12400004,
"ERR_JS_AUTHORIZATION_LIST_TOO_LARGE" : 12400005
}
......@@ -33,8 +33,9 @@ export default function ActsAccountAppAccess() {
console.info(`sleep #{time} over ...`)
})
}
beforeAll(async function (done) {
await featureAbility.startAbility(
beforeAll(async function (done) {
console.debug("====>ActsAccountAuthenticator beforeAll start====");
await featureAbility.startAbilityForResult(
{
want:
{
......@@ -47,7 +48,8 @@ export default function ActsAccountAppAccess() {
},
},
)
await sleep(1500)
await sleep(1500);
console.debug("====>ActsAccountAuthenticator beforeAll end====");
done();
});
beforeEach(async (done)=>{
......@@ -619,7 +621,9 @@ export default function ActsAccountAppAccess() {
expect(data.length).assertEqual(1)
} catch(err) {
console.debug("====>ActsAccountSelectAccountByOptions_0100 err:" + JSON.stringify(err));
await appAccountManager.removeAccount(name);
expect(err).assertEqual(null)
done();
}
try{
await appAccountManager.removeAccount(name)
......@@ -654,7 +658,9 @@ export default function ActsAccountAppAccess() {
expect(data.length).assertEqual(3)
} catch(err) {
console.debug("====>ActsAccountSelectAccountByOptions_0200 err:" + JSON.stringify(err));
await appAccountManager.removeAccount(name);
expect(err).assertEqual(null)
done();
}
try{
await appAccountManager.removeAccount(name)
......@@ -690,7 +696,9 @@ export default function ActsAccountAppAccess() {
expect(data.length).assertEqual(1)
} catch(err) {
console.debug("====>ActsAccountSelectAccountByOptions_0300 err:" + JSON.stringify(err));
await appAccountManager.removeAccount(name);
expect(err).assertEqual(null)
done();
}
try{
await appAccountManager.removeAccount(name)
......
......@@ -14,12 +14,12 @@
*/
import account from '@ohos.account.appAccount'
import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium'
import {AccountErrCode} from './AccountErrCode.test.js'
const NAMELIMIT = 512;
const LENGTHLIMIT = 1024;
const ERR_PARAMETER_CHECK_FAILD =401
const ERR_INVALID_PARAMETER = 12300002
const ERR_ACCOUNT_EXIST = 12300008
const createAccountOptions = {customData:{age:'12'}} //k and v length 1024 ,k and v size 1024
const createAccountOptionsDiff = {customData:{sex:'male'}}
export default function ActsAccountCreateAccount() {
......@@ -129,7 +129,8 @@ export default function ActsAccountCreateAccount() {
expect(err).assertEqual(null);
appAccountManager.createAccount("account_name_callback_third", createAccountOptions, (err)=>{
console.debug("====>add account second time ActsAccountCreateAccount_0500 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_ACCOUNT_EXIST);
console.debug("====>ActsAccountCreateAccount_0500 AccountErrCode.JsErrCode:" + AccountErrCode.ERR_JS_ACCOUNT_ALREADY_EXIST);
expect(err.code).assertEqual(AccountErrCode.ERR_JS_ACCOUNT_ALREADY_EXIST);
appAccountManager.removeAccount("account_name_callback_third", (err)=>{
console.debug("====>delete Account ActsAccountCreateAccount_0500 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
......@@ -156,7 +157,7 @@ export default function ActsAccountCreateAccount() {
}
catch(err){
console.debug("====>add account for the second time 0600 err:" + JSON.stringify(err));
expect(err.code).assertEqual(ERR_ACCOUNT_EXIST);
expect(err.code).assertEqual(AccountErrCode.ERR_JS_ACCOUNT_ALREADY_EXIST);
await appAccountManager.removeAccount("account_name_promise_third");
console.debug("====>ActsAccountCreateAccount_0600 end====");
done();
......@@ -521,7 +522,7 @@ export default function ActsAccountCreateAccount() {
expect(err).assertEqual(null);
appAccountManager.createAccount("account_name_callback_same", createAccountOptionsDiff, (err)=>{
console.debug("====>add account second time ActsAccountCreateAccount_2300 err:" + JSON.stringify(err));
expect(err.code).assertEqual(12300008);
expect(err.code).assertEqual(AccountErrCode.ERR_JS_ACCOUNT_ALREADY_EXIST);
appAccountManager.removeAccount("account_name_callback_same", (err)=>{
console.debug("====>delete Account ActsAccountCreateAccount_2300 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
......@@ -548,7 +549,7 @@ export default function ActsAccountCreateAccount() {
}
catch(err){
console.debug("====>add account for the second time err:" + JSON.stringify(err));
expect(err.code).assertEqual(12300008);
expect(err.code).assertEqual(AccountErrCode.ERR_JS_ACCOUNT_ALREADY_EXIST);
appAccountManager.removeAccount("account_name_promise_same");
console.debug("====>ActsAccountCreateAccount_2400 end====");
done();
......
......@@ -427,7 +427,7 @@ export default function ActsAccountSetAppAccess() {
expect(err).assertEqual(null);
appAccountManager.setAppAccess("AppAccess_callback_account", enableBundle, false, (err)=>{
console.debug("====>setAppAccess ActsAccountSetAppAccess_1500 err:" + JSON.stringify(err));
expect(err.code == 12400001).assertEqual(true);
expect(err).assertEqual(null);
appAccountManager.removeAccount("AppAccess_callback_account", (err)=>{
console.debug("====>delete Account ActsAccountSetAppAccess_1500 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
......@@ -459,17 +459,17 @@ export default function ActsAccountSetAppAccess() {
}
console.debug("====>disableAppAccess ActsAccountSetAppAccess_1600 start====");
try{
await appAccountManager.setAppAccess("AppAccess_promise_account", enableBundle,false);
expect().assertFail();
done();
await appAccountManager.setAppAccess("AppAccess_promise_account", enableBundle, false);
}
catch(err){
console.debug("====>disableAppAccess ActsAccountSetAppAccess_1600 err:" + JSON.stringify(err));
expect(err.code == 12400001).assertEqual(true);
console.debug("====>disableAppAccess ActsAccountSetAppAccess_1800 err:" + JSON.stringify(err));
await appAccountManager.removeAccount("AppAccess_promise_account");
console.debug("====>ActsAccountSetAppAccess_1600 end====");
expect().assertFail();
done();
}
await appAccountManager.removeAccount("AppAccess_promise_account");
console.debug("====>ActsAccountSetAppAccess_1600 end====");
done();
});
/*
......@@ -486,7 +486,7 @@ export default function ActsAccountSetAppAccess() {
console.debug("====>add account ActsAccountSetAppAccess_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
appAccountManager.setAppAccess("AppAccess_callback_notExistBundle", notExistBundle, false, (err)=>{
expect(err.code == 12400001).assertEqual(true);
expect(err).assertEqual(null);
appAccountManager.removeAccount("AppAccess_callback_notExistBundle", (err)=>{
console.debug("====>delete Account ActsAccountSetAppAccess_1700 err:" + JSON.stringify(err));
expect(err).assertEqual(null);
......@@ -515,13 +515,15 @@ export default function ActsAccountSetAppAccess() {
}
catch(err){
console.debug("====>disableAppAccess ActsAccountSetAppAccess_1800 err:" + JSON.stringify(err));
expect(err.code == 12400001).assertEqual(true);
console.debug("====>delete account ActsAccountSetAppAccess_1800 start====");
await appAccountManager.removeAccount("AppAccess_promise_notExistBundle");
console.debug("====>ActsAccountSetAppAccess_1600 end====");
await appAccountManager.removeAccount("AppAccess_promise_account");
expect().assertFail();
done();
}
});
console.debug("====>delete account ActsAccountSetAppAccess_1800 start====");
await appAccountManager.removeAccount("AppAccess_promise_notExistBundle");
console.debug("====>ActsAccountSetAppAccess_1600 end====");
done();
});
/*
* @tc.number : ActsAccountSetAppAccess_1900
......
......@@ -17,9 +17,8 @@
"package": "com.example.actsaccounttest",
"name": ".MyApplication",
"deviceType": [
"tablet",
"default",
"phone"
"tablet",
"default"
],
"distro": {
"deliveryWithInstall": true,
......
......@@ -31,15 +31,15 @@ export default {
await accountMgr.setAppAccess("zhangsan", "com.example.actsaccounttest", true);
console.info('====>ServiceAbility setAppAccess actsaccountoperatetest zhangsan');
await accountMgr.setAppAccess("zhangsan", "com.example.actsaccountoperatetest", true);
console.info('====>ServiceAbility lcc addAccount 02 onStart');
console.info('====>ServiceAbility addAccount 02 onStart');
accountMgr.createAccount("lisi", async (err)=>{
console.info('====>ServiceAbility setAppAccess actsaccounttest lisi');
await accountMgr.setAppAccess("lisi", "com.example.actsaccounttest", true);
console.info('====>ServiceAbility setAppAccess actsaccountoperatetest lisi');
await accountMgr.setAppAccess("lisi", "com.example.actsaccountoperatetest", true);
console.info('====>ServiceAbility lcc addAccount 03 onStart');
console.info('====>ServiceAbility addAccount 03 onStart');
accountMgr.createAccount("wangwu", async (err)=>{
console.info('====>ServiceAbility lcc enableAppAccess 03 onStart');
console.info('====>ServiceAbility enableAppAccess 03 onStart');
console.info('====>ServiceAbility setAppAccess actsaccounttest wangwu');
await accountMgr.setAppAccess("wangwu", "com.example.actsaccounttest", true)
console.info('====>ServiceAbility setAppAccess actsaccountoperatetest wangwu');
......
......@@ -20,6 +20,8 @@ hctest_suite("ActsBundleMgrTest") {
"${aafwk_lite_path}/interfaces/kits/want_lite",
"${appexecfwk_lite_path}/interfaces/kits/bundle_lite/slite",
"${appexecfwk_lite_path}/interfaces/kits/bundle_lite",
"${appexecfwk_lite_path}/utils/bundle_lite",
"//commonlibrary/utils_lite/memory/include",
]
cflags = [ "-Wno-error" ]
}
......@@ -16,12 +16,15 @@
#include <string.h>
#include <unistd.h>
#include "adapter.h"
#include "hctest.h"
#include "securec.h"
#include "bundle_info.h"
#include "bundle_manager.h"
#include "want.h"
#define nullptr NULL
/**
* @brief register a test suit named BundleMgrTestSuite
* @param subsystem name is appexecfwk
......@@ -55,7 +58,7 @@ LITE_TEST_CASE(BundleMgrTestSuite, testClearAbilityInfoLegal, Function | MediumT
TEST_ASSERT_TRUE(result == 0);
char *name = "com.openharmony.testjsdemo";
size_t len = strlen(name);
abilityInfo.bundleName = (char *)malloc(len + 1);
abilityInfo.bundleName = (char *)(AdapterMalloc(len + 1));
TEST_ASSERT_NOT_NULL(abilityInfo.bundleName);
errno_t err = strncpy_s(abilityInfo.bundleName, len + 1, name, len);
TEST_ASSERT_EQUAL(err, EOK);
......@@ -78,12 +81,13 @@ LITE_TEST_CASE(BundleMgrTestSuite, testClearAbilityInfoIllegal, Function | Mediu
TEST_ASSERT_TRUE(result == 0);
char *name = "com.openharmony.testjsdemo";
size_t len = strlen(name);
abilityInfo.bundleName = (char *)malloc(len + 1);
abilityInfo.bundleName = (char *)(AdapterMalloc(len + 1));
TEST_ASSERT_NOT_NULL(abilityInfo.bundleName);
errno_t err = strncpy_s(abilityInfo.bundleName, len + 1, name, len);
TEST_ASSERT_EQUAL(err, EOK);
ClearAbilityInfo(NULL);
TEST_ASSERT_EQUAL_STRING(abilityInfo.bundleName, name);
AdapterFree(abilityInfo.bundleName);
printf("------end testClearAbilityInfoIllegal------\n");
}
......@@ -100,7 +104,7 @@ LITE_TEST_CASE(BundleMgrTestSuite, testClearBundleInfoLegal, Function | MediumTe
TEST_ASSERT_TRUE(result == 0);
char *name = "com.openharmony.testjsdemo";
size_t len = strlen(name);
bundleInfo.bundleName = (char *)malloc(len + 1);
bundleInfo.bundleName = (char *)(AdapterMalloc(len + 1));
TEST_ASSERT_NOT_NULL(bundleInfo.bundleName);
errno_t err = strncpy_s(bundleInfo.bundleName, len + 1, name, len);
TEST_ASSERT_EQUAL(err, EOK);
......@@ -123,12 +127,13 @@ LITE_TEST_CASE(BundleMgrTestSuite, testClearBundleInfoIllegal, Function | Medium
TEST_ASSERT_TRUE(result == 0);
char *name = "com.openharmony.testjsdemo";
size_t len = strlen(name);
bundleInfo.bundleName = (char *)malloc(len + 1);
bundleInfo.bundleName = (char *)(AdapterMalloc(len + 1));
TEST_ASSERT_NOT_NULL(bundleInfo.bundleName);
errno_t err = strncpy_s(bundleInfo.bundleName, len + 1, name, len);
TEST_ASSERT_EQUAL(err, EOK);
ClearBundleInfo(NULL);
TEST_ASSERT_EQUAL_STRING(bundleInfo.bundleName, name);
AdapterFree(bundleInfo.bundleName);
printf("------end testClearBundleInfoIllegal------\n");
}
......@@ -145,7 +150,7 @@ LITE_TEST_CASE(BundleMgrTestSuite, testClearModuleInfoLegal, Function | MediumTe
TEST_ASSERT_TRUE(result == 0);
char *name = "test";
size_t len = strlen(name);
moduleInfo.moduleName = (char *)malloc(len + 1);
moduleInfo.moduleName = (char *)(AdapterMalloc(len + 1));
TEST_ASSERT_NOT_NULL(moduleInfo.moduleName);
errno_t err = strncpy_s(moduleInfo.moduleName, len + 1, name, len);
TEST_ASSERT_EQUAL(err, EOK);
......@@ -168,12 +173,13 @@ LITE_TEST_CASE(BundleMgrTestSuite, testClearModuleInfoIllegal, Function | Medium
TEST_ASSERT_TRUE(result == 0);
char *name = "test";
size_t len = strlen(name);
moduleInfo.moduleName = (char *)malloc(len + 1);
moduleInfo.moduleName = (char *)(AdapterMalloc(len + 1));
TEST_ASSERT_NOT_NULL(moduleInfo.moduleName);
errno_t err = strncpy_s(moduleInfo.moduleName, len + 1, name, len);
TEST_ASSERT_EQUAL(err, EOK);
ClearModuleInfo(NULL);
TEST_ASSERT_EQUAL_STRING(moduleInfo.moduleName, name);
AdapterFree(moduleInfo.moduleName);
printf("------end testClearModuleInfoIllegal------\n");
}
......
......@@ -28,10 +28,13 @@ group("arkui") {
"ace_ets_third_test:ActsAceEtsThirdTest",
"ace_ets_web_dev:ActsAceWebDevTest",
"ace_ets_web_dev_two:ActsAceWebDevTwoTest",
"ace_ets_web_dev_three:ActsAceWebDevThreeTest",
"ace_ets_xcomponent:ActsAceXComponentEtsTest",
"ace_js_attribute_api:ActsAceJsApiTest",
"ace_napi_test:ActsAceNapiEtsTest",
"ace_standard:ActsAceStandardTest",
"ace_standard_video:ActsAceStandardVideoTest",
"libuv:ActsLibuvTestSuite",
"libuv:libuvTest",
]
}
{
"app": {
"bundleName": "com.example.myapplication",
"bundleName": "com.open.harmony.acewebthreetest",
"vendor": "huawei",
"versionCode": 1000000,
"versionName": "1.0.0",
......
......@@ -13,31 +13,29 @@
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("ActsEdmTest") {
ohos_js_hap_suite("ActsAceWebDevThreeTest") {
hap_profile = "entry/src/main/module.json"
js_build_mode = "debug"
deps = [
":edm_js_assets",
":edm_resources",
":ace_ets_web_dev_js_assets",
":ace_ets_web_dev_resources",
]
ets2abc = true
certificate_profile = "signature/openharmony_sx.p7b"
hap_name = "ActsEdmTest"
subsystem_name = "customization"
part_name = "enterprise_device_management"
hap_name = "ActsAceWebDevThreeTest"
}
ohos_app_scope("edm_app_profile") {
ohos_app_scope("ace_ets_web_dev_app_profile") {
app_profile = "AppScope/app.json"
sources = [ "AppScope/resources" ]
}
ohos_js_assets("edm_js_assets") {
ohos_js_assets("ace_ets_web_dev_js_assets") {
source_dir = "entry/src/main/ets"
}
ohos_resources("edm_resources") {
ohos_resources("ace_ets_web_dev_resources") {
sources = [ "entry/src/main/resources" ]
deps = [ ":edm_app_profile" ]
deps = [ ":ace_ets_web_dev_app_profile" ]
hap_profile = "entry/src/main/module.json"
}
......@@ -2,28 +2,17 @@
"description": "Configuration for hjunit demo Tests",
"driver": {
"type": "OHJSUnitTest",
"test-timeout": "180000",
"bundle-name": "com.example.myapplication",
"test-timeout": "600000",
"bundle-name": "com.open.harmony.acewebthreetest",
"module-name": "phone",
"shell-timeout": "600000"
"shell-timeout": "600000",
"testcase-timeout": 70000
},
"kits": [
{
"type": "ShellKit",
"run-command": [
"acm create -n edmuser -t normal"
],
"teardown-command": [
"acm delete -i 101"
]
},
{
"kits": [{
"test-file-name": [
"ActsEdmTest.hap",
"ExtensionZeroTest.hap"
"ActsAceWebDevThreeTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
}
]
}]
}
\ No newline at end of file
......@@ -17,7 +17,7 @@ export default class MainAbility extends Ability {
console.log("[Demo] MainAbility onWindowStageCreate windowStage="+ windowStage)
globalThis.windowStage = windowStage
globalThis.abilityContext = this.context
windowStage.setUIContent(this.context, "pages/index/index", null)
windowStage.setUIContent(this.context, "MainAbility/pages/web", null)
}
onWindowStageDestroy() {
......@@ -34,4 +34,4 @@ export default class MainAbility extends Ability {
// Ability has back to background
console.log("[Demo] MainAbility onBackground")
}
};
\ No newline at end of file
};
/*
* 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.
*/
* 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'
......@@ -21,7 +21,8 @@ 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 level', '-s testType', '-s size', '-s timeout',
'-s dryRun'
])
let targetParams = '';
for (const key in parameters) {
......@@ -52,14 +53,19 @@ export default class OpenHarmonyTestRunner implements TestRunner {
console.log('OpenHarmonyTestRunner onRun run')
abilityDelegatorArguments = AbilityDelegatorRegistry.getArguments()
abilityDelegator = AbilityDelegatorRegistry.getAbilityDelegator()
var MainAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility'
var testAbilityName = abilityDelegatorArguments.bundleName + '.MainAbility'
let lMonitor = {
abilityName: MainAbilityName,
abilityName: testAbilityName,
onAbilityCreate: onAbilityCreateCallback,
};
abilityDelegator.addAbilityMonitor(lMonitor, addAbilityMonitorCallback)
var cmd = 'aa start -d 0 -a com.example.myapplication.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) => {
......
......@@ -12,10 +12,8 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import edmPromiseTest from './edmPromise.test.ets'
import edmCallbackTest from './edmCallback.test.ets'
import webJsunit from './WebJsunit.test'
export default function testsuite() {
edmCallbackTest()
edmPromiseTest()
webJsunit()
}
\ No newline at end of file
/*
* 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 events_emitter from '@ohos.events.emitter';
import { expect } from "@ohos/hypium";
export default class Utils {
static sleep(time){
return new Promise((resolve,reject)=>{
setTimeout(()=>{
resolve("ok")
},time)
}).then(()=>{
console.info(`sleep ${time} over...`)
})
}
static registerEvent(testCaseName,expectedValue,eventId,done){
console.info(`[${testCaseName}] START`);
try{
let callBack=(backData)=>{
console.info(`${testCaseName} get result is:`+JSON.stringify(backData));
expect(backData.data.ACTION).assertEqual(expectedValue);
console.info(`[${testCaseName}] END`);
done()
}
let innerEvent = {
eventId:eventId,
priority:events_emitter.EventPriority.LOW
}
events_emitter.on(innerEvent,callBack)
}catch(err){
console.info(`[${testCaseName}] err:`+JSON.stringify(err));
}
}
static emitEvent(actualValue,eventId){
try {
let backData = {
data: {
"ACTION": actualValue
}
}
let backEvent = {
eventId:eventId,
priority:events_emitter.EventPriority.LOW
}
console.info("webFlag start to emit action state");
events_emitter.emit(backEvent, backData);
} catch (err) {
console.info("webFlag emit action state err: " + JSON.stringify(err));
}
}
static registerEventTwo(testCaseName,eventId,done){
console.info(`[${testCaseName}] START`);
try{
let callBack=(backData)=>{
console.info(`${testCaseName} get result is:`+JSON.stringify(backData));
expect(backData.data.actualValue).assertLarger(backData.data.expectedValue-100);
expect(backData.data.actualValue).assertLess(backData.data.expectedValue-(-100));
console.info(`[${testCaseName}] END`);
done()
}
let innerEvent = {
eventId:eventId,
priority:events_emitter.EventPriority.LOW
}
events_emitter.on(innerEvent,callBack)
}catch(err){
console.info(`[${testCaseName}] err:`+JSON.stringify(err));
}
}
static emitEventTwo(expectedValue,actualValue,eventId){
try {
let backData = {
data: {
"expectedValue":expectedValue,
"actualValue":actualValue
}
}
let backEvent = {
eventId:eventId,
priority:events_emitter.EventPriority.LOW
}
console.info("webFlag start to emit action state");
events_emitter.emit(backEvent, backData);
} catch (err) {
console.info("webFlag emit action state err: " + JSON.stringify(err));
}
}
static registerContainEvent(testCaseName,expectedValue,eventId,done){
console.info(`[${testCaseName}] START`);
try{
let callBack=(backData)=>{
console.info(`${testCaseName} get result is:`+JSON.stringify(backData));
expect(backData.data.ACTION).assertContain(expectedValue);
console.info(`[${testCaseName}] END`);
done()
}
let innerEvent = {
eventId:eventId,
priority:events_emitter.EventPriority.LOW
}
events_emitter.on(innerEvent,callBack)
}catch(err){
console.info(`[${testCaseName}] err:`+JSON.stringify(err));
}
}
static commitKey(emitKey){
try {
let backData = {
data: {
"ACTION": emitKey
}
}
let backEvent = {
eventId:10,
priority:events_emitter.EventPriority.LOW
}
console.info("start send emitKey");
events_emitter.emit(backEvent, backData);
} catch (err) {
console.info("emit emitKey err: " + JSON.stringify(err));
}
}
}
......@@ -6,8 +6,8 @@
"description": "$string:phone_entry_dsc",
"mainElement": "MainAbility",
"deviceTypes": [
"tablet",
"default",
"tablet",
"default",
"phone"
],
"deliveryWithInstall": true,
......@@ -31,50 +31,13 @@
]
}]
}],
"extensionAbilities": [
{
"srcEntrance": "./ets/EnterpriseAdminAbility/EnterpriseAdminAbility.ts",
"name": "com.example.myapplication.EnterpriseAdminAbility",
"icon": "$media:icon",
"srcLanguage": "ets",
"description": "$string:phone_entry_main",
"type": "enterpriseAdmin",
"visible": true
}
],
"requestPermissions": [
{
"name": "ohos.permission.SYSTEM_FLOAT_WINDOW",
"reason": "need use ohos.permission.SYSTEM_FLOAT_WINDOW"
},
{
"name": "ohos.permission.CAPTURE_SCREEN",
"reason": "need use ohos.permission.SYSTEM_FLOAT_WINDOW"
},
{
"name": "ohos.permission.GET_BUNDLE_INFO",
"reason": "need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name": "ohos.permission.INSTALL_BUNDLE",
"reason": "need use ohos.permission.GET_BUNDLE_INFO"
},
{
"name": "ohos.permission.ENTERPRISE_SET_DATETIME",
"reason": "need use ENTERPRISE_SET_DATETIME"
},
{
"name": "ohos.permission.MANAGE_ENTERPRISE_DEVICE_ADMIN",
"reason": "need use MANAGE_ENTERPRISE_DEVICE_ADMIN"
},
{
"name": "ohos.permission.SET_ENTERPRISE_INFO",
"reason": "need use SET_ENTERPRISE_INFO"
{
"name": "ohos.permission.LOCATION"
},
{
"name": "ohos.permission.ENTERPRISE_SUBSCRIBE_MANAGED_EVENT",
"reason": "need use ENTERPRISE_SUBSCRIBE_MANAGED_EVENT"
"name": "ohos.permission.INTERNET"
}
]
}
}
\ No newline at end of file
}
{
"src": [
"MainAbility/pages/web"
]
}
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<body>
<div id="pageHeight"></div>
<p style="background-color:green;font-family:arial;color:red;font-size:300px;text-align:center"> <a href="http://www.w3school.com.cn">This is a link</a></p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>index</title>
<style>
#pageHeight{
height:1300px
}
</style>
</head>
<body>
<div id="container">首页</div>
<div id="pageHeight"></div>
<a href="file:///data/storage/el1/bundle/phone/resources/rawfile/second.html" id="fileAccess">打开rawfile文件</a>
<img src="file:///data/storage/el1/bundle/phone/resources/rawfile/icon.png" alt="icon" id="imgs">
</body>
<script>
let ele=document.getElementById("imgs");
let loadImage;
ele.onload=function(){
loadImage="load complete"
}
function getUserAgent(){
return navigator.userAgent
}
function test(){
backToEts.test("backToEts")
}
function testRunJavaScript(){
return "testRunJavaScript"
}
function getPageHeight(){
let height=document.body.scrollHeight
return height
}
function proxy(){
objName.register("backToEts")
}
function registerTest(){
let str=objName.register();
console.log(str);
return str
}
function jsAccess(){
console.log("web111")
}
function consoleTest(){
console.log("console test")
}
function alertTest(){
alert('alert test')
}
function confirmTest(){
confirm("confirm test")
}
function getImgResult(){
return loadImage
}
function toPrompt(){
let result=prompt("age","20");
console.log("result:"+result)
}
function openRawFile(){
document.getElementById("fileAccess").click()
}
function htmlTest(){
let str = objName.testOne('Web')
return str
}
</script>
</html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>second</title>
</head>
<body>
<div style="height: 1300px;background-color: #999999;">second pages</div>
</body>
</html>
\ No newline at end of file
<!DOCTYPE HTML>
<html>
<head>
<meta charset="UTF-8">
<script type="text/javascript">
var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024);
var msg;
db.transaction(function (tx) {
tx.executeSql('CREATE TABLE IF NOT EXISTS LOGS (id unique, log)');
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (1, "W3Cschool教程")');
tx.executeSql('INSERT INTO LOGS (id, log) VALUES (2, "www.w3cschool.cn")');
msg = '<p>数据表已创建,且插入了两条数据。</p>';
document.querySelector('#status').innerHTML = msg;
});
db.transaction(function (tx) {
tx.executeSql('SELECT * FROM LOGS', [], function (tx, results) {
var len = results.rows.length, i;
msg = "<p>查询记录条数: " + len + "</p>";
document.querySelector('#status').innerHTML += msg;
for (i = 0; i < len; i++){
msg = "<p><b>" + results.rows.item(i).log + "</b></p>";
document.querySelector('#status').innerHTML += msg;
}
}, null);
});
</script>
</head>
<body>
<div id="status" name="status">状态信息</div>
</body>
</html>
\ No newline at end of file
......@@ -35,8 +35,14 @@ uint32_t PluginRender::xcHeight_ = 0;
uint32_t PluginRender::xcWidth_ = 0;
double PluginRender::off_x = 0;
double PluginRender::off_y = 0;
uint32_t PluginRender::toolType_ = 5;
uint32_t PluginRender::mousecallback_ = 0;
float PluginRender::tiltX_= 0;
float PluginRender::tiltY_= 0;
uint32_t PluginRender::touchType = 4;
OH_NativeXComponent_TouchEvent PluginRender::testTouchEvent_;
OH_NativeXComponent_MouseEvent PluginRender::testMouseEvent_;
OH_NativeXComponent_MouseEvent_Callback PluginRender::mouseEventcallback_;
void OnSurfaceCreatedCB(OH_NativeXComponent* component, void* window)
{
......@@ -101,7 +107,7 @@ void DispatchTouchEventCB(OH_NativeXComponent* component, void* window)
void DispatchMouseEventCB(OH_NativeXComponent* component, void* window)
{
LOGE("DispatchMouseEventCB");
LOGD("DispatchMouseEventCB");
int32_t ret;
char idStr[OH_XCOMPONENT_ID_LEN_MAX + 1] = {};
uint64_t idSize = OH_XCOMPONENT_ID_LEN_MAX + 1;
......@@ -110,6 +116,8 @@ void DispatchMouseEventCB(OH_NativeXComponent* component, void* window)
return;
}
std::string id(idStr);
auto render = PluginRender::GetInstance(id);
render->DispatchMouseEvent(component, window);
}
PluginRender::PluginRender(std::string& id)
......@@ -122,6 +130,8 @@ PluginRender::PluginRender(std::string& id)
renderCallback->OnSurfaceChanged = OnSurfaceChangedCB;
renderCallback->OnSurfaceDestroyed = OnSurfaceDestroyedCB;
renderCallback->DispatchTouchEvent = DispatchTouchEventCB;
auto renderMouseEventCallback = PluginRender::GetNXComponentMouseEventCallback();
renderMouseEventCallback->DispatchMouseEvent = DispatchMouseEventCB;
}
PluginRender* PluginRender::GetInstance(std::string& id)
......@@ -140,10 +150,17 @@ OH_NativeXComponent_Callback* PluginRender::GetNXComponentCallback()
return &PluginRender::callback_;
}
OH_NativeXComponent_MouseEvent_Callback* PluginRender::GetNXComponentMouseEventCallback()
{
return &PluginRender::mouseEventcallback_;
}
void PluginRender::SetNativeXComponent(OH_NativeXComponent* component)
{
component_ = component;
OH_NativeXComponent_RegisterCallback(component_, &PluginRender::callback_);
uint32_t mousecallback = OH_NativeXComponent_RegisterMouseEventCallback(component_, &PluginRender::mouseEventcallback_);
mousecallback_ = mousecallback;
}
void PluginRender::OnSurfaceCreated(OH_NativeXComponent* component, void* window)
......@@ -209,6 +226,19 @@ void PluginRender::DispatchTouchEvent(OH_NativeXComponent* component, void* wind
touchEvent_.touchPoints[i].id, touchEvent_.touchPoints[i].x, touchEvent_.touchPoints[i].y);
LOGE("Touch Info : screenx = %{public}f, screeny = %{public}f",
touchEvent_.touchPoints[i].screenX, touchEvent_.touchPoints[i].screenY);
OH_NativeXComponent_TouchPointToolType toolType = OH_NativeXComponent_TouchPointToolType::OH_NATIVEXCOMPONENT_TOOL_TYPE_UNKNOWN;
float tiltX = 123.0;
float tiltY = 321.0;
int32_t ret1;
int32_t ret2;
int32_t ret3;
ret1 = OH_NativeXComponent_GetTouchPointToolType(component, i, &toolType);
ret2 = OH_NativeXComponent_GetTouchPointTiltX(component, i, &tiltX);
ret3 = OH_NativeXComponent_GetTouchPointTiltY(component, i, &tiltY);
toolType_ = toolType;
tiltX_ = tiltX;
tiltY_ = tiltY;
LOGE("Touch Info : DispatchTouchEvent dots[%{public}d] toolType=%{public}u, tiltX=%{public}f, tiltY=%{public}f", i, toolType, tiltX, tiltY);
}
} else {
LOGE("Touch fail");
......@@ -230,12 +260,32 @@ napi_value PluginRender::Export(napi_env env, napi_value exports)
DECLARE_NAPI_FUNCTION("TestGetXComponentOffset_x", PluginRender::TestGetXComponentOffset_x),
DECLARE_NAPI_FUNCTION("TestGetXComponentOffset_y", PluginRender::TestGetXComponentOffset_y),
DECLARE_NAPI_FUNCTION("TestGetXComponent_TouchEvent", PluginRender::TestGetXComponent_TouchEvent),
DECLARE_NAPI_FUNCTION("TestGetXComponent_MouseEvent", PluginRender::TestGetXComponent_MouseEvent),
DECLARE_NAPI_FUNCTION("TestGetXComponentpointtool_tilty", PluginRender::TestGetXComponentpointtool_tilty),
DECLARE_NAPI_FUNCTION("TestGetXComponentpointtool_type", PluginRender::TestGetXComponentpointtool_type),
DECLARE_NAPI_FUNCTION("TestGetXComponentpointtool_tiltx", PluginRender::TestGetXComponentpointtool_tiltx),
DECLARE_NAPI_FUNCTION("TestGetXComponent_RegisterMouseEventCallback", PluginRender::TestGetXComponent_RegisterMouseEventCallback),
};
NAPI_CALL(env, napi_define_properties(env, exports, sizeof(desc) / sizeof(desc[0]), desc));
return exports;
}
void PluginRender::DispatchMouseEvent(OH_NativeXComponent* component, void* window)
{
LOGE("----------TestMouse Mouse Info DispatchMouseEvent 11");
int32_t ret = OH_NativeXComponent_GetMouseEvent(component, window, &mouseEvent_);
LOGE("----------TestMouse Mouse Info DispatchMouseEvent");
if (ret == OH_NATIVEXCOMPONENT_RESULT_SUCCESS) {
testMouseEvent_ = mouseEvent_;
LOGE("TestMouse Mouse Info : x = %{public}f, y = %{public}f screenx = %{public}f, screeny = %{public}f", mouseEvent_.x, mouseEvent_.y, mouseEvent_.screenX, mouseEvent_.screenY);
LOGE("TestMouse Mouse Info : action = %{public}d, button = %{public}d, time = %{public}lld", mouseEvent_.action, mouseEvent_.button, mouseEvent_.timestamp );
LOGE("TestMouse Mouse Info : action = %{public}d, button = %{public}d", mouseEvent_.action, mouseEvent_.button);
} else {
LOGE("Mouse Info fail");
}
}
napi_value PluginRender::NapiChangeShape(napi_env env, napi_callback_info info)
{
LOGE("NapiChangeShape");
......@@ -425,6 +475,39 @@ napi_value PluginRender::TestGetXComponentOffset_y(napi_env env, napi_callback_i
return output;
}
napi_value PluginRender::TestGetXComponentpointtool_tiltx(napi_env env, napi_callback_info info)
{
LOGE("xclog running PluginRender::TestGetXComponentpointtool_tiltx");
napi_value output;
NAPI_CALL(env, napi_create_double(env, tiltX_, &output));
LOGE("xclog TestGetXComponentpointtool_tiltx : %{public}f", tiltX_);
return output;
}
napi_value PluginRender::TestGetXComponentpointtool_tilty(napi_env env, napi_callback_info info)
{
LOGE("xclog running PluginRender::TestGetXComponentpointtool_tilty");
napi_value output;
NAPI_CALL(env, napi_create_double(env, tiltY_, &output));
LOGE("xclog TestGetXComponentpointtool_tilty : %{public}f", tiltY_);
return output;
}
napi_value PluginRender::TestGetXComponentpointtool_type(napi_env env, napi_callback_info info)
{
LOGE("xclog running PluginRender::TestGetXComponentpointtool_type");
napi_value output;
NAPI_CALL(env, napi_create_double(env, toolType_, &output));
LOGE("xclog TestGetXComponentpointtool_type : %{public}u", toolType_);
return output;
}
napi_value PluginRender::TestGetXComponent_TouchEvent(napi_env env, napi_callback_info info)
{
LOGE("xclog running PluginRender::TestGetXComponent_TouchEvent");
......@@ -446,6 +529,44 @@ napi_value PluginRender::TestGetXComponent_TouchEvent(napi_env env, napi_callbac
return obj;
}
napi_value PluginRender::TestGetXComponent_MouseEvent(napi_env env, napi_callback_info info)
{
LOGE("xclog running PluginRender::TestGetXComponent_MouseEvent");
napi_value surf_x;
napi_value surf_y;
napi_value t_button;
NAPI_CALL(env, napi_create_double(env, testMouseEvent_.x, &(surf_x)));
NAPI_CALL(env, napi_create_double(env, testMouseEvent_.y, &(surf_y)));
NAPI_CALL(env, napi_create_uint32(env, testMouseEvent_.button, &(t_button)));
napi_value obj;
NAPI_CALL(env, napi_create_object(env, &obj));
NAPI_CALL(env, napi_set_named_property(env, obj, "surface_X1", surf_x)); // float x
NAPI_CALL(env, napi_set_named_property(env, obj, "surface_Y1", surf_y)); // float y
NAPI_CALL(env, napi_set_named_property(env, obj, "mousebutton", t_button)); // int32_t
return obj;
}
napi_value PluginRender::TestGetXComponent_RegisterMouseEventCallback(napi_env env, napi_callback_info info)
{
LOGE("xclog running PluginRender::TestGetXComponent_RegisterMouseEventCallback");
napi_value callback_;
NAPI_CALL(env, napi_create_double(env, mousecallback_, &(callback_)));
napi_value obj;
NAPI_CALL(env, napi_create_object(env, &obj));
NAPI_CALL(env, napi_set_named_property(env, obj, "MouseCallback_", callback_)); // float x
return obj;
}
#ifdef __cplusplus
}
#endif
\ No newline at end of file
......@@ -29,6 +29,7 @@ public:
explicit PluginRender(std::string& id);
static PluginRender* GetInstance(std::string& id);
static OH_NativeXComponent_Callback* GetNXComponentCallback();
static OH_NativeXComponent_MouseEvent_Callback* GetNXComponentMouseEventCallback();
void SetNativeXComponent(OH_NativeXComponent* component);
......@@ -50,7 +51,11 @@ public:
static napi_value TestGetXComponentOffset_x(napi_env env, napi_callback_info info);
static napi_value TestGetXComponentOffset_y(napi_env env, napi_callback_info info);
static napi_value TestGetXComponent_TouchEvent(napi_env env, napi_callback_info info);
static napi_value TestGetXComponent_MouseEvent(napi_env env, napi_callback_info info);
static napi_value TestGetXComponentpointtool_tiltx(napi_env env, napi_callback_info info);
static napi_value TestGetXComponentpointtool_tilty(napi_env env, napi_callback_info info);
static napi_value TestGetXComponentpointtool_type(napi_env env, napi_callback_info info);
static napi_value TestGetXComponent_RegisterMouseEventCallback(napi_env env, napi_callback_info info);
// Callback, called by ACE XComponent
void OnSurfaceCreated(OH_NativeXComponent* component, void* window);
......@@ -68,10 +73,16 @@ public:
static uint32_t isCreated_;
static uint32_t xcHeight_;
static uint32_t xcWidth_;
static uint32_t toolType_;
static float tiltX_;
static float tiltY_;
static uint32_t mousecallback_;
static double off_x;
static double off_y;
static uint32_t touchType;
static OH_NativeXComponent_TouchEvent testTouchEvent_;
static OH_NativeXComponent_MouseEvent testMouseEvent_;
static OH_NativeXComponent_MouseEvent_Callback mouseEventcallback_;
OH_NativeXComponent* component_;
EGLCore* eglCore_;
......@@ -83,6 +94,7 @@ public:
double x_;
double y_;
OH_NativeXComponent_TouchEvent touchEvent_;
OH_NativeXComponent_MouseEvent mouseEvent_;
};
#endif // _PLUGIN_RENDER_H_
......@@ -30,6 +30,9 @@ struct XComponentTest {
@State private xcomponentWidth:number = 720;
private offset_x:double = 0.000;
private offset_y:double = 610.000;
private index:number = 0;
private callback_:number = 0;
private type_:number = 5;
private touchTypeDown:number = 0;
private touchTypeUp:number = 1;
private touchTypeMove:number = 2;
......@@ -70,6 +73,8 @@ struct XComponentTest {
globalThis.xcomponentWidth = this.xcomponentWidth;
globalThis.touchTypeDown = this.touchTypeDown;
globalThis.touchTypeUp = this.touchTypeUp;
globalThis.type_ = this.type_;
globalThis.index = this.index;
globalThis.touchTypeMove = this.touchTypeMove;
globalThis.touchTypeCancel = this.touchTypeCancel;
globalThis.offset_x = this.offset_x;
......@@ -124,6 +129,7 @@ struct XComponentTest {
globalThis.xcomponentContext2 = this.xcomponentContext2;
globalThis.xcomponentId2 = this.xcomponentId2;
globalThis.xcomponentHeight = this.xcomponentHeight;
globalThis.callback_ = this.callback_;
globalThis.xcomponentWidth = this.xcomponentWidth;
globalThis.offset_x = this.offset_x;
globalThis.offset_y = this.offset_y;
......
......@@ -200,5 +200,116 @@ export default function XComponentTestJsunit() {
}
});
/**
* @tc.number SUB_ACE_BASIC_ETS_API_0600
* @tc.name XComponentTest006
* @tc.desc aceXComponentEtsTest
*/
it('XComponentTest006', 0, async function (done) {
await Utils.sleep(1000);
console.info('xclog XComponentTest006 START');
var x_value = 340;
var y_value = 350;
//x:300 y:430左右范围是xcomponent.context2的changelayout范围
//x:300 y:150左右范围是xcomponent.context1的changeshape范围
var xcomponentContext1= globalThis.xcomponentContext1;
var insidex = globalThis.index;
if (!xcomponentContext1) {
console.error('xclog xcomponentContext null')
result = false;
} else {
result = true;
var result;
var inside_x;
var inside_y;
var button_t;
await Utils.sleep(1000);
inside_x = xcomponentContext1.TestGetXComponent_MouseEvent().surface_X1;
inside_y = xcomponentContext1.TestGetXComponent_MouseEvent().surface_Y1;
button_t = xcomponentContext1.TestGetXComponent_MouseEvent().mousebutton;
console.info('xclog ets touchEvent: surf_x1 is '+ inside_x + ', surf_y1 is '+ inside_y + ', button_t is ' + button_t );
}
expect(inside_x).assertEqual(insidex);
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_API_0700
* @tc.name XComponentTest007
* @tc.desc aceXComponentEtsTest
*/
it('XComponentTest007', 0, async function (done) {
await Utils.sleep(1000);
console.info('xclog XComponentTest007 START');
var x_value = 340;
var y_value = 350;
//x:300 y:430左右范围是xcomponent.context2的changelayout范围
//x:300 y:150左右范围是xcomponent.context1的changeshape范围
var xcomponentContext2= globalThis.xcomponentContext2;
var callback_ = globalThis.callback_;
if (!xcomponentContext2) {
console.error('xclog xcomponentContext null')
tilty = false;
} else {
result = true;
var result;
var callback;
await Utils.sleep(1000);
callback = xcomponentContext2.TestGetXComponent_RegisterMouseEventCallback().MouseCallback_;
console.info('xclog ets touchEvent: callback is ' + callback );
}
expect(callback).assertEqual(callback_);
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_API_0800
* @tc.name XComponentTest008
* @tc.desc aceXComponentEtsTest
*/
it('XComponentTest008', 0, async function (done) {
await Utils.sleep(1000);
console.info('xclog XComponentTest008 START');
var x_value = 340;
var y_value = 350;
//x:300 y:430左右范围是xcomponent.context2的changelayout范围
//x:300 y:150左右范围是xcomponent.context1的changeshape范围
var xcomponentContext1= globalThis.xcomponentContext1;
var type_ = globalThis.type_;
if (!xcomponentContext1) {
console.error('xclog xcomponentContext null')
result = false;
} else {
result = true;
var result;
var tilty;
var tiltx;
var type_t;
await Utils.sleep(1000);
tilty = xcomponentContext1.TestGetXComponentpointtool_tilty();
type_t = xcomponentContext1.TestGetXComponentpointtool_type();
tiltx = xcomponentContext1.TestGetXComponentpointtool_tiltx();
console.info('xclog ets touchEvent: surf_x is '+ tiltx + ', surf_y is '+ tilty + ', type_t is ' + type_t );
}
expect(type_t).assertEqual(type_);
done();
});
})
}
......@@ -22,7 +22,7 @@ import napitest from 'libnapitest.so'
export default function nativeApiStringJsunit() {
describe('napiStringTest', function () {
const empty = '';
const empty = 'hh';
var value;
async function sleep(time) {
......@@ -56,5 +56,215 @@ export default function nativeApiStringJsunit() {
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0200
* @tc.name napCreateArrayBuffer
* @tc.desc aceNapiEtsTest
*/
it('napCreateArrayBuffer002', 0, async function (done) {
console.info('napiCreateArrayBuffer002 START');
value = napitest.napCreateArrayBuffer();
console.info('apiCreateArrayBuffer testString result is: ' + JSON.stringify(value));
expect(value instanceof ArrayBuffer).assertTrue();
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0300
* @tc.name naiGetArrayBufferInfo
* @tc.desc aceNapiEtsTest
*/
it('naiGetArrayBufferInfo003', 0, async function (done) {
console.info('naiGetArrayBufferInfo003 START');
value = napitest.naiGetArrayBufferInfo();
console.info('naiGetArrayBufferInfo testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(1024);
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0400
* @tc.name napiCreateFunction
* @tc.desc aceNapiEtsTest
*/
it('napiCreateFunction004', 0, async function (done) {
console.info('napiCreateFunction004 START');
value = napitest.napiCreateFunction();
console.info('napiCreateFunction testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(1);
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0500
* @tc.name napiNewInstance
* @tc.desc aceNapiEtsTest
*/
it('napiNewInstance005', 0, async function (done) {
console.info(' napiNewInstance005 START');
value = napitest.napiNewInstance('hello');
console.info('napiNewInstance testString result is: ' + JSON.stringify(value));
expect(value == undefined).assertTrue();
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0600
* @tc.name napiDefineClass
* @tc.desc aceNapiEtsTest
*/
it('napiDefineClass006', 0, async function (done) {
console.info('napiDefineClass006 START');
value = napitest.napiDefineClass();
console.info('napiDefineClass testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0700
* @tc.name napiCancelAsyncWork
* @tc.desc aceNapiEtsTest
*/
it('napiCancelAsyncWork007', 0, async function (done) {
console.info('napiCancelAsyncWork007 START');
value = napitest.napiCancelAsyncWork();
console.info('napiCancelAsyncWork testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0900
* @tc.name napiRunScriptPath
* @tc.desc aceNapiEtsTest
*/
it('napiRunScriptPath009', 0, async function (done) {
console.info('napiRunScriptPath START');
value = napitest.napiRunScriptPath();
console.info('napiRunScriptPath testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0100
* @tc.name napiCallThreadsafeFunction
* @tc.desc aceNapiEtsTest
*/
it('napiCallThreadsafeFunction010', 0, async function (done) {
console.info('napiCallThreadsafeFunction START');
value = napitest.napiCallThreadsafeFunction();
console.info('napiCallThreadsafeFunction testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0011
* @tc.name napiCreateThreadsafeFunction
* @tc.desc aceNapiEtsTest
*/
it('napiCreateThreadsafeFunction011', 0, async function (done) {
console.info('napiCreateThreadsafeFunction START');
value = napitest.napiCreateThreadsafeFunction();
console.info('napiCreateThreadsafeFunction testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0012
* @tc.name napiRefthreadSafeFunction
* @tc.desc aceNapiEtsTest
*/
it('napiRefthreadSafeFunction012', 0, async function (done) {
console.info('napiRefthreadSafeFunction START');
value = napitest.napiRefthreadSafeFunction();
console.info('napiRefthreadSafeFunction testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0013
* @tc.name napiCreateDate
* @tc.desc aceNapiEtsTest
*/
it('napiCreateDate013', 0, async function (done) {
console.info('napiCreateDate START');
value = napitest.napiCreateDate();
console.info('napiCreateDate testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(1)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0014
* @tc.name napiCreateBigintUint64
* @tc.desc aceNapiEtsTest
*/
it('napiCreateBigintUint64014', 0, async function (done) {
console.info('napiCreateBigintUint64 START');
value = napitest.napiCreateBigintUint64();
console.info('napiCreateBigintUint64 testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(1)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0015
* @tc.name napiCreateBigintInt64
* @tc.desc aceNapiEtsTest
*/
it('napiCreateBigintInt64015', 0, async function (done) {
console.info('napiCreateBigintInt64 START');
value = napitest.napiCreateBigintInt64();
console.info('napiCreateBigintInt64 testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(1)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0016
* @tc.name napiCreateBigintWords
* @tc.desc aceNapiEtsTest
*/
it('napiCreateBigintWords016', 0, async function (done) {
console.info('napiCreateBigintWords START');
value = napitest.napiCreateBigintWords();
console.info('napiCreateBigintWords testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0017
* @tc.name napiFatalerror
* @tc.desc aceNapiEtsTest
*/
it('napiFatalerror017', 0, async function (done) {
console.info('napiFatalerror START');
value = napitest.napiFatalerror();
console.info('napiFatalerror testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
/**
* @tc.number SUB_ACE_BASIC_ETS_NAPI_0018
* @tc.name napiGetTypedarrayInfo
* @tc.desc aceNapiEtsTest
*/
it('napiGetTypedarrayInfo018', 0, async function (done) {
console.info('napiFatalerror START');
value = napitest.napiGetTypedarrayInfo();
console.info('napiGetTypedarrayInfo testString result is: ' + JSON.stringify(value));
expect(value).assertEqual(0)
done();
});
})
}
此差异已折叠。
# Libuv测试套件说明
- [介绍](#section_Libuv_001)
- [使用说明](#section_Libuv_002)
## 介绍<a name="section_Libuv_001"></a>
Libuv测试套件使用Libuv三方库内原有的unittest,通过acts测试套件框架在运行时调用运行,具体目录结构如下:
```bash
.
├── BUILD.gn
├── comm.gni
├── cplibuv.sh
├── genlocal.py
├── src
│ ├── ActsLibuvTestSuite.cpp
│ └── ActsLibuvTestSuite.h
└── Test.json
```
* BUILD.gn:编译脚本,编译acts测试套件,编译Libuv三方库测试代码,执行actions事件在acts测试套件对应的testcases目录下建立libuvdata目录,然后将运行测试需要的Libuv测试进程,解析运行日志所需的Python脚本拷贝到libuvdata目录。
* comm.gni:通用编译配置。
* cplibuv.sh:编译后actions事件执行的脚本。
* genlocal.py:libuv的test程序运行后结果会保存在task_log.log文件内,分析运行日志后会存储结果在summary_report.xml文件内,然后根据xdevice流程生成summary_report。
* src:测试套件的实现,内部直接调用libuv的unittest进程。
* Test.json:运行测试需要json脚本,包括拷贝内容到开发板。
## 使用说明<a name="section_Libuv_002"></a>
* 编译运行
```bash
./build.sh --product-name rk3568 --gn-args build_xts=true --build-target "acts" --gn-args is_standard_system=true
```
* 测试运行:进入suites/acts目录,执行python -m xdevice,然后在命令框里输入一下命令
```bash
run -l ActsLibuvTestSuite
```
\ No newline at end of file
{
"description": "Config for ActsLibuvTestSuite test cases",
"driver": {
"module-name": "ActsLibuvTestSuite",
"native-test-timeout": "120000",
"native-test-device-path": "/data/local/tmp",
"runtime-hint": "100s",
"type": "CppTest"
},
"kits": [
{
"pre-push" : [
],
"post-push" : [
"chmod -R 777 /data/local/tmp/*"
],
"push": [
"ActsLibuvTestSuite->/data/local/tmp/ActsLibuvTestSuite",
"libuvdata/libuvruntest->/data/local/tmp/libuvruntest "
],
"type": "PushKit"
},
{
"type": "ShellKit",
"run-command": [
"remount",
"mkdir /data/test",
"cd /data/local/tmp"
],
"teardown-localcommand": [
"python testcases/libuvdata/genlocal.py"
]
}
]
}
\ No newline at end of file
# Copyright (C) 2022 Huawei Device Co., Ltd.
# Copyright (c) 2022 Shenzhen Kaihong Digital Industry Development 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
......@@ -11,21 +11,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import("//build/ohos_var.gni")
import("//test/xts/tools/build/suite.gni")
group("edm_test_grop") {
testonly = true
if (is_standard_system) {
deps = [
"TestExtensionAbility_001:ExtensionZeroTest",
"edm_xts_stage:ActsEdmTest",
]
}
}
common_include = [ "//test/xts/acts/graphic/libuv/src" ]
common_depends = [ "//third_party/libuv:uv_static" ]
group("customization") {
testonly = true
if (is_standard_system) {
deps = [ ":edm_test_grop" ]
}
}
#!/bin/bash
# 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.
set -e
mkdir -p "suites/acts/testcases/libuvdata"
cp -rf "../../test/xts/acts/arkui/libuv/genlocal.py" "suites/acts/testcases/libuvdata"
cp -rf "common/common/libuvruntest" "suites/acts/testcases/libuvdata"
此差异已折叠。
此差异已折叠。
......@@ -24,6 +24,7 @@ group("ets_utils") {
"process_lib_standard:process_js_test",
"uri_lib_standard:uri_js_test",
"url_lib_standard:url_js_test",
"util2_lib_standard:util2_js_test",
"util_lib_standard:util_js_test",
"worker_lib_standard:worker_js_hap",
"xml_lib_standard:xml_js_test",
......
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
此差异已折叠。
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册