提交 7205256b 编写于 作者: C caochuan

add exif testcase

Signed-off-by: Ncaochuan <caochuan@huawei.com>
Change-Id: I330e943f42763d7d75c1d50f879c19be27e82d1d
上级 e0ec19de
# Copyright (C) 2021 Huawei Device Co., Ltd. # Copyright (C) 2023 Huawei Device Co., Ltd.
# Licensed under the Apache License, Version 2.0 (the "License"); # Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License. # you may not use this file except in compliance with the License.
# You may obtain a copy of the License at # You may obtain a copy of the License at
...@@ -16,20 +16,20 @@ import("//test/xts/tools/build/suite.gni") ...@@ -16,20 +16,20 @@ import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("image_getProperty_js_hap") { ohos_js_hap_suite("image_getProperty_js_hap") {
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
deps = [ deps = [
":image_getProperty_js_assets", ":image_js_assets",
":image_getProperty_resources", ":image_resources",
] ]
certificate_profile = "./signature/openharmony_sx.p7b" certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ActsImageGetImagePropertyJsTest" hap_name = "ActsImageGetImagePropertyJsTest"
subsystem_name = "multimedia" subsystem_name = "multimedia"
part_name = "multimedia_image_standard" part_name = "multimedia_image_framework"
} }
ohos_js_assets("image_getProperty_js_assets") { ohos_js_assets("image_js_assets") {
js2abc = true js2abc = true
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
source_dir = "./src/main/js" source_dir = "./src/main/js"
} }
ohos_resources("image_getProperty_resources") { ohos_resources("image_resources") {
sources = [ "./src/main/resources" ] sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json" hap_profile = "./src/main/config.json"
} }
...@@ -4,8 +4,8 @@ ...@@ -4,8 +4,8 @@
"type": "OHJSUnitTest", "type": "OHJSUnitTest",
"test-timeout": "300000", "test-timeout": "300000",
"shell-timeout": "120000", "shell-timeout": "120000",
"bundle-name": "ohos.acts.multimedia.image.GetImageProperty", "bundle-name": "ohos.acts.multimedia.image",
"package-name": "ohos.acts.multimedia.image.GetImageProperty" "package-name": "ohos.acts.multimedia.image"
}, },
"kits": [ "kits": [
{ {
...@@ -18,28 +18,27 @@ ...@@ -18,28 +18,27 @@
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"mkdir -p /data/app/el2/100/base/ohos.acts.multimedia.image.GetImageProperty/haps/entry/files/", "mkdir -p /data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/files/",
"chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.image.GetImageProperty/haps/entry/files/*" "chmod -R 666 /data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/files/*"
], ],
"teardown-command":[ "teardown-command": []
]
}, },
{ {
"type": "PushKit", "type": "PushKit",
"pre-push": [], "pre-push": [],
"push": [ "push": [
"./resource/image/test_exif1.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image.GetImageProperty/haps/entry/files" "./resource/image/test_exif1.jpg ->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/files",
"./resource/image/test_hw.jpg->/data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/files"
] ]
}, },
{ {
"type": "ShellKit", "type": "ShellKit",
"run-command": [ "run-command": [
"hilog -Q pidoff", "hilog -Q pidoff",
"chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.image.GetImageProperty/haps/entry/files/test_exif.jpg" "chmod 777 /data/app/el2/100/base/ohos.acts.multimedia.image/haps/entry/files/*"
], ],
"teardown-command": [ "teardown-command": [
"rm -rf /data/app/el2/100/base/ohos.acts.multimedia.image.GetImageProperty/haps/entry/files/*" "rm -rf /data/app/el2/100/base/ohos.acts.multimedia.image/*"
] ]
} }
] ]
......
{ {
"app": { "app": {
"apiVersion": { "apiVersion": {
"compatible": 6, "compatible": 9,
"releaseType": "Beta1", "releaseType": "Beta1",
"target": 7 "target": 9
}, },
"vendor": "acts", "vendor": "acts",
"bundleName": "ohos.acts.multimedia.image.GetImageProperty", "bundleName": "ohos.acts.multimedia.image",
"version": { "version": {
"code": 1000000, "code": 1000000,
"name": "1.0.0" "name": "1.0.0"
...@@ -57,11 +57,7 @@ ...@@ -57,11 +57,7 @@
} }
], ],
"deviceType": [ "deviceType": [
"tablet", "default"
"phone",
"tablet",
"tv",
"wearable"
], ],
"mainAbility": ".MainAbility", "mainAbility": ".MainAbility",
"distro": { "distro": {
...@@ -100,7 +96,7 @@ ...@@ -100,7 +96,7 @@
"reason": "use ohos.permission.WRITE_MEDIA" "reason": "use ohos.permission.WRITE_MEDIA"
} }
], ],
"package": "ohos.acts.multimedia.image.GetImageProperty", "package": "ohos.acts.multimedia.image",
"name": ".entry", "name": ".entry",
"js": [ "js": [
{ {
......
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (C) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (C) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (c) 2022 Huawei Device Co., Ltd. * Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (c) 2022 Huawei Device Co., Ltd. * Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
......
/* /*
* Copyright (c) 2022 Huawei Device Co., Ltd. * Copyright (c) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -30,7 +30,7 @@ function translateParamsToString(parameters) { ...@@ -30,7 +30,7 @@ function translateParamsToString(parameters) {
return targetParams.trim() return targetParams.trim()
} }
export default { export default {
onPrepare() { onPrepare() {
console.info('OpenHarmonyTestRunner OnPrepare') console.info('OpenHarmonyTestRunner OnPrepare')
}, },
...@@ -44,12 +44,11 @@ function translateParamsToString(parameters) { ...@@ -44,12 +44,11 @@ function translateParamsToString(parameters) {
var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName var cmd = 'aa start -d 0 -a ' + testAbilityName + ' -b ' + abilityDelegatorArguments.bundleName
cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters) cmd += ' ' + translateParamsToString(abilityDelegatorArguments.parameters)
var debug = abilityDelegatorArguments.parameters["-D"] var debug = abilityDelegatorArguments.parameters["-D"]
console.info('debug value : '+debug) console.info('debug value : ' + debug)
if (debug == 'true') if (debug == 'true') {
{
cmd += ' -D' cmd += ' -D'
} }
console.info('cmd : '+cmd) console.info('cmd : ' + cmd)
abilityDelegator.executeShellCommand(cmd, (err, data) => { abilityDelegator.executeShellCommand(cmd, (err, data) => {
console.info('executeShellCommand : err : ' + JSON.stringify(err)); console.info('executeShellCommand : err : ' + JSON.stringify(err));
console.info('executeShellCommand : data : ' + data.stdResult); console.info('executeShellCommand : data : ' + data.stdResult);
......
/* /*
* Copyright (C) 2021 Huawei Device Co., Ltd. * Copyright (C) 2023 Huawei Device Co., Ltd.
* Licensed under the Apache License, Version 2.0 (the "License"); * Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License. * you may not use this file except in compliance with the License.
* You may obtain a copy of the License at * You may obtain a copy of the License at
...@@ -13,6 +13,8 @@ ...@@ -13,6 +13,8 @@
* limitations under the License. * limitations under the License.
*/ */
import imageGetImageProperty from "./getProperty.test.js"; import imageGetImageProperty from "./getProperty.test.js";
import imageGetImagePropertySecond from "./getPropertySecond.test.js";
export default function testsuite() { export default function testsuite() {
imageGetImageProperty(); imageGetImageProperty();
imageGetImagePropertySecond();
} }
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册