diff --git a/resourceschedule/resourceschedule_standard/ffrt/AppScope/resources/base/element/string.json b/resourceschedule/resourceschedule_standard/ffrt/AppScope/resources/base/element/string.json index 1080233f01384411ec684b58955cb8808746fdd3..5427011cc520f8aae66246980c7160d8543fa833 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/AppScope/resources/base/element/string.json +++ b/resourceschedule/resourceschedule_standard/ffrt/AppScope/resources/base/element/string.json @@ -2,7 +2,7 @@ "string": [ { "name": "app_name", - "value": "MyApplication" + "value": "FfrtTest" } ] } diff --git a/resourceschedule/resourceschedule_standard/ffrt/BUILD.gn b/resourceschedule/resourceschedule_standard/ffrt/BUILD.gn index 2329e3f8c5cf014f71865c5b92b8124f42291ea8..dd81004a3253d1874ccd0940d3418f6c0f1db5f2 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/BUILD.gn +++ b/resourceschedule/resourceschedule_standard/ffrt/BUILD.gn @@ -12,10 +12,10 @@ # limitations under the License. import("//test/xts/tools/build/suite.gni") ohos_js_app_suite("resourceschedule_ffrt_js_test") { - test_hap = true + test_hap = true testonly = true certificate_profile = "./signature/openharmony_sx.p7b" hap_name = "ActsFfrtNativeTest" part_name = "ffrt" subsystem_name = "resourceschedule" -} \ No newline at end of file +} diff --git a/resourceschedule/resourceschedule_standard/ffrt/build-profile.json5 b/resourceschedule/resourceschedule_standard/ffrt/build-profile.json5 index d7b1117cdb34aab2983ac65026d9e8dcc91332d1..a4faee90097895dbe9a4df066b887c5f79459123 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/build-profile.json5 +++ b/resourceschedule/resourceschedule_standard/ffrt/build-profile.json5 @@ -1,8 +1,8 @@ { "app": { "signingConfigs": [], - "compileSdkVersion": 9, - "compatibleSdkVersion": 9, + "compileSdkVersion": 10, + "compatibleSdkVersion": 10, "products": [ { "name": "default", diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/build-profile.json5 b/resourceschedule/resourceschedule_standard/ffrt/entry/build-profile.json5 index 6f2e56988dbd729f98b983526b1dcd2727218d93..e61ac60a8c55ad5833b9bb13d04e553b3b699c55 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/build-profile.json5 +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/build-profile.json5 @@ -10,7 +10,6 @@ "targets": [ { "name": "default", - "runtimeOS": "HarmonyOS" }, { "name": "ohosTest", diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/CMakeLists.txt b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/CMakeLists.txt index e59172465a93af89429ba1ff91886ec7e78364c7..ee7b1638c2fbd53996074c55dcaace5bbd3218db 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/CMakeLists.txt +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/CMakeLists.txt @@ -1,6 +1,6 @@ # the minimum version of CMake. cmake_minimum_required(VERSION 3.4.1) -project(MyApplication) +project(FfrtTest) set(NATIVERENDER_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}) diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp index 3f1a733c985d28dad4e6200800c336d72e14d47f..2a4d76b47bb5f2d95f681a36aef1c08308882078 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/ffrtndk.cpp @@ -1,3 +1,17 @@ +/* + * 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. + */ #include "napi/native_api.h" #include "hilog/log.h" #include "ffrt/task.h" diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/types/libentry/index.d.ts b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/types/libentry/index.d.ts new file mode 100644 index 0000000000000000000000000000000000000000..e44f3615a4767c36b4fdc841b781af96bf1971a8 --- /dev/null +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/types/libentry/index.d.ts @@ -0,0 +1 @@ +export const add: (a: number, b: number) => number; \ No newline at end of file diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/types/libentry/oh-package.json5 b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/types/libentry/oh-package.json5 new file mode 100644 index 0000000000000000000000000000000000000000..8c49cae229917b627c5b40b536d6e8115b59f080 --- /dev/null +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/cpp/types/libentry/oh-package.json5 @@ -0,0 +1,6 @@ +{ + "name": "libentry.so", + "types": "./index.d.ts", + "version": "", + "description": "Please describe the basic information." +} \ No newline at end of file diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/module.json5 b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/module.json5 index bf200cf76105205a9bfd171943debd39ecac28de..9b07af70a189c0165e30b9f4bedc3bfd22b53cda 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/module.json5 +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/main/module.json5 @@ -5,7 +5,8 @@ "description": "$string:module_desc", "mainElement": "EntryAbility", "deviceTypes": [ - "phone" + "default", + "tablet" ], "deliveryWithInstall": true, "installationFree": false, diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/Ffrt.test.ets b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/Ffrt.test.ets index af249f4c4463a2e7c1a0cef10961d42ea87b6d54..27c00c61efb501c766c397fcf86a8f5848bcca1f 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/Ffrt.test.ets +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/Ffrt.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import hilog from '@ohos.hilog'; import { describe, beforeAll, beforeEach, afterEach, afterAll, it, expect } from '@ohos/hypium' import ffrtndk from 'libffrtndk.so'; diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/List.test.ets b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/List.test.ets index fe3fa1ef63f29d71cceca3d90a82c53db3efb569..767d03110bc7264598f7d6fe267e51bcde0f235c 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/List.test.ets +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/test/List.test.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import ffrtTest from './Ffrt.test' export default function testsuite() { diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/TestAbility.ets b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/TestAbility.ets index e3f6e911d3fffba1e1795c60ed1ee4db15b386fd..e9f38bba24df6c45465ec9086a6144c0ed8f37fb 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/TestAbility.ets +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/TestAbility.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import UIAbility from '@ohos.app.ability.UIAbility'; import AbilityDelegatorRegistry from '@ohos.app.ability.abilityDelegatorRegistry'; import hilog from '@ohos.hilog'; diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/pages/Index.ets b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/pages/Index.ets index 166366593a7e55ef17e6619f68a4c46214814858..22e23283ed1995cac92e498a5f5eb5eca727bf55 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/pages/Index.ets +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/ets/testability/pages/Index.ets @@ -1,3 +1,17 @@ +/* + * Copyright (c) 2021 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ import hilog from '@ohos.hilog'; @Entry diff --git a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/module.json5 b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/module.json5 index 87631d3a1063ffadf6d6d73835cc89e49cad410f..48785eea7ff5c9be4859de09321efdc7c3aa2a47 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/module.json5 +++ b/resourceschedule/resourceschedule_standard/ffrt/entry/src/ohosTest/module.json5 @@ -5,6 +5,8 @@ "description": "$string:module_test_desc", "mainElement": "TestAbility", "deviceTypes": [ + "default", + "tablet", "phone" ], "deliveryWithInstall": true, diff --git a/resourceschedule/resourceschedule_standard/ffrt/oh-package.json5 b/resourceschedule/resourceschedule_standard/ffrt/oh-package.json5 index f1b2443f227ffd6f81488be4bab52fc24e5f5b84..b97ffaec4ed18fbc0880f9348834c01aa98ed4e8 100644 --- a/resourceschedule/resourceschedule_standard/ffrt/oh-package.json5 +++ b/resourceschedule/resourceschedule_standard/ffrt/oh-package.json5 @@ -4,7 +4,7 @@ "@ohos/hypium": "1.0.6" }, "author": "", - "name": "myapplication", + "name": "ffrttest", "description": "Please describe the basic information.", "main": "", "version": "1.0.0",