提交 ca6a7566 编写于 作者: L lifansheng

Signed-off-by: lifansheng <lifansheng1@huawei.com>

 On branch master
 Your branch is up to date with 'origin/master'.

 Changes to be committed:
	modified:   compileruntime/BUILD.gn
	modified:   compileruntime/process_lib_standard/BUILD.gn
	modified:   compileruntime/process_lib_standard/Test.json
	deleted:    compileruntime/process_lib_standard/project/entry/package.json
	new file:   compileruntime/process_lib_standard/signature/openharmony_sx.p7b
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/config.json -> compileruntime/process_lib_standard/src/main/config.json
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java -> compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MainAbility.java
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java -> compileruntime/process_lib_standard/src/main/java/com/example/childprocess/MyApplication.java
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/process_lib_standard/src/main/js/default/app.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/process_lib_standard/src/main/js/default/i18n/en-US.json
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/process_lib_standard/src/main/js/default/i18n/zh-CN.json
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/process_lib_standard/src/main/js/default/pages/index/index.css
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/process_lib_standard/src/main/js/default/pages/index/index.hml
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/process_lib_standard/src/main/js/default/pages/index/index.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/process_lib_standard/src/main/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/process_lib_standard/src/main/js/test/List.test.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/js/test/Process.test.js -> compileruntime/process_lib_standard/src/main/js/test/Process.test.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/process_lib_standard/src/main/resources/base/element/string.json
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/app.js -> compileruntime/process_lib_standard/src/ohosTest/js/default/app.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json -> compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/en-US.json
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json -> compileruntime/process_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css -> compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.css
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml -> compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.hml
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js -> compileruntime/process_lib_standard/src/ohosTest/js/default/pages/index/index.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js -> compileruntime/process_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/List.test.js -> compileruntime/process_lib_standard/src/ohosTest/js/test/List.test.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json -> compileruntime/process_lib_standard/src/ohosTest/resources/base/element/string.json
	modified:   compileruntime/url_lib_standard/BUILD.gn
	modified:   compileruntime/url_lib_standard/Test.json
	deleted:    compileruntime/url_lib_standard/project/entry/package.json
	new file:   compileruntime/url_lib_standard/signature/openharmony_sx.p7b
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/config.json -> compileruntime/url_lib_standard/src/main/config.json
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java -> compileruntime/url_lib_standard/src/main/java/com/example/url/MainAbility.java
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java -> compileruntime/url_lib_standard/src/main/java/com/example/url/MyApplication.java
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/url_lib_standard/src/main/js/default/app.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png -> compileruntime/url_lib_standard/src/main/js/default/common/images/Wallpaper.png
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg -> compileruntime/url_lib_standard/src/main/js/default/common/images/bg-tv.jpg
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/url_lib_standard/src/main/js/default/i18n/en-US.json
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/url_lib_standard/src/main/js/default/i18n/zh-CN.json
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/url_lib_standard/src/main/js/default/pages/index/index.css
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/url_lib_standard/src/main/js/default/pages/index/index.hml
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/url_lib_standard/src/main/js/default/pages/index/index.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/url_lib_standard/src/main/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/url_lib_standard/src/main/js/test/List.test.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/js/test/url.test.js -> compileruntime/url_lib_standard/src/main/js/test/url.test.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/url_lib_standard/src/main/resources/base/element/string.json
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/app.js -> compileruntime/url_lib_standard/src/ohosTest/js/default/app.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json -> compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/en-US.json
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json -> compileruntime/url_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css -> compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.css
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml -> compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.hml
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js -> compileruntime/url_lib_standard/src/ohosTest/js/default/pages/index/index.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js -> compileruntime/url_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/List.test.js -> compileruntime/url_lib_standard/src/ohosTest/js/test/List.test.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json -> compileruntime/url_lib_standard/src/ohosTest/resources/base/element/string.json
	modified:   compileruntime/util_lib_standard/BUILD.gn
	modified:   compileruntime/util_lib_standard/Test.json
	deleted:    compileruntime/util_lib_standard/project/entry/package.json
	new file:   compileruntime/util_lib_standard/signature/openharmony_sx.p7b
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/config.json -> compileruntime/util_lib_standard/src/main/config.json
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MainAbility.java -> compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MainAbility.java
	renamed:    compileruntime/process_lib_standard/project/entry/src/main/java/com/example/childprocess/MyApplication.java -> compileruntime/util_lib_standard/src/main/java/com/example/childprocess/MyApplication.java
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/java/com/example/url/MainAbility.java -> compileruntime/util_lib_standard/src/main/java/com/example/url/MainAbility.java
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/java/com/example/url/MyApplication.java -> compileruntime/util_lib_standard/src/main/java/com/example/url/MyApplication.java
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/util_lib_standard/src/main/js/default/app.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/Wallpaper.png -> compileruntime/util_lib_standard/src/main/js/default/common/images/Wallpaper.png
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/common/images/bg-tv.jpg -> compileruntime/util_lib_standard/src/main/js/default/common/images/bg-tv.jpg
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/util_lib_standard/src/main/js/default/i18n/en-US.json
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/util_lib_standard/src/main/js/default/i18n/zh-CN.json
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/util_lib_standard/src/main/js/default/pages/index/index.css
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/util_lib_standard/src/main/js/default/pages/index/index.hml
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/util_lib_standard/src/main/js/default/pages/index/index.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/util_lib_standard/src/main/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/util_lib_standard/src/main/js/test/List.test.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/test/TextCodr.test.js -> compileruntime/util_lib_standard/src/main/js/test/TextCodr.test.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/main/js/test/url.test.js -> compileruntime/util_lib_standard/src/main/js/test/url.test.js
	renamed:    compileruntime/url_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/util_lib_standard/src/main/resources/base/element/string.json
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/app.js -> compileruntime/util_lib_standard/src/ohosTest/js/default/app.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/en-US.json -> compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/en-US.json
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/i18n/zh-CN.json -> compileruntime/util_lib_standard/src/ohosTest/js/default/i18n/zh-CN.json
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.css -> compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.css
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.hml -> compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.hml
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/default/pages/index/index.js -> compileruntime/util_lib_standard/src/ohosTest/js/default/pages/index/index.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/js/test/ExampleJsunit.test.js -> compileruntime/util_lib_standard/src/ohosTest/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/process_lib_standard/project/entry/src/ohosTest/js/test/List.test.js -> compileruntime/util_lib_standard/src/ohosTest/js/test/List.test.js
	renamed:    compileruntime/util_lib_standard/project/entry/src/ohosTest/resources/base/element/string.json -> compileruntime/util_lib_standard/src/ohosTest/resources/base/element/string.json
	modified:   compileruntime/worker_lib_standard/BUILD.gn
	modified:   compileruntime/worker_lib_standard/Test.json
	deleted:    compileruntime/worker_lib_standard/hap/entry-debug-standard-unsigned.hap
	deleted:    compileruntime/worker_lib_standard/project/entry/package.json
	new file:   compileruntime/worker_lib_standard/signature/openharmony_sx.p7b
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/config.json -> compileruntime/worker_lib_standard/src/main/config.json
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/app.js -> compileruntime/worker_lib_standard/src/main/js/default/app.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/en-US.json -> compileruntime/worker_lib_standard/src/main/js/default/i18n/en-US.json
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/i18n/zh-CN.json -> compileruntime/worker_lib_standard/src/main/js/default/i18n/zh-CN.json
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.css -> compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.css
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.hml -> compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.hml
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/index/index.js -> compileruntime/worker_lib_standard/src/main/js/default/pages/index/index.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.css -> compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.css
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.hml -> compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.hml
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/pages/second/second.js -> compileruntime/worker_lib_standard/src/main/js/default/pages/second/second.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_002.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_002.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_003.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_003.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_004.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_004.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_005.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_005.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_006.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_006.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_007.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_007.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/default/workers/worker_008.js -> compileruntime/worker_lib_standard/src/main/js/default/workers/worker_008.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/test/ExampleJsunit.test.js -> compileruntime/worker_lib_standard/src/main/js/test/ExampleJsunit.test.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/test/List.test.js -> compileruntime/worker_lib_standard/src/main/js/test/List.test.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/js/test/Worker.test.js -> compileruntime/worker_lib_standard/src/main/js/test/Worker.test.js
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/resources/base/element/string.json -> compileruntime/worker_lib_standard/src/main/resources/base/element/string.json
	renamed:    compileruntime/worker_lib_standard/project/entry/src/main/resources/base/media/icon.png -> compileruntime/worker_lib_standard/src/main/resources/base/media/icon.png
上级 10425d05
...@@ -10,13 +10,16 @@ ...@@ -10,13 +10,16 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni")
group("jsapi") { group("compileruntime") {
testonly = true testonly = true
if (is_standard_system) {
deps = [ deps = [
"StartupProcessJSApiTest:startup_process_js_test", "process_lib_standard:process_js_test",
"StartupUrlJSApiTest:startup_url_js_test", "url_lib_standard:url_js_test",
"StartupUtilJSApiTest:startup_util_js_test", "util_lib_standard:util_js_test",
"StartupWorkerJSApiTest:startup_worker_js_test", "worker_lib_standard:worker_js_hap",
] ]
}
} }
...@@ -10,9 +10,29 @@ ...@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("process_js_test") {
hap_profile = "./src/main/config.json"
deps = [
":process_js_assets",
":process_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "ProcessJSApiTest"
ohos_js_hap_suite("startup_process_js_test") { # part_name = "prebuilt_hap"
test_hap_name = "StartupProcessJSApiTest" # subsystem_name = "xts"
hap_source_path = "hap/entry-debug-rich-unsigned.hap" }
ohos_js_assets("process_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("process_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"StartupProcessJSApiTest.hap" "ProcessJSApiTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -227,8 +227,7 @@ describe('ChildProcessTest', function () { ...@@ -227,8 +227,7 @@ describe('ChildProcessTest', function () {
// process GetUid test // process GetUid test
it('GetUid_test_001', 0, function () { it('GetUid_test_001', 0, function () {
var that = new process.Process() var result = process.getUid
var result = that.getUid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -236,9 +235,8 @@ describe('ChildProcessTest', function () { ...@@ -236,9 +235,8 @@ describe('ChildProcessTest', function () {
}) })
it('GetUid_test_002', 0, function () { it('GetUid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){ for(var i = 0; i < 3; i++){
var result = that.getUid var result = process.getUid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = true var flag = true
...@@ -250,8 +248,7 @@ describe('ChildProcessTest', function () { ...@@ -250,8 +248,7 @@ describe('ChildProcessTest', function () {
// process GetGid test // process GetGid test
it('GetGid_test_001', 0, function () { it('GetGid_test_001', 0, function () {
var that = new process.Process() var result = process.getGid
var result = that.getGid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -259,9 +256,8 @@ describe('ChildProcessTest', function () { ...@@ -259,9 +256,8 @@ describe('ChildProcessTest', function () {
}) })
it('GetGid_test_002', 0, function () { it('GetGid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){ for(var i = 0; i < 3; i++){
var result = that.getGid var result = process.getGid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = true var flag = true
...@@ -273,8 +269,7 @@ describe('ChildProcessTest', function () { ...@@ -273,8 +269,7 @@ describe('ChildProcessTest', function () {
// process GetEuid test // process GetEuid test
it('GetEuid_test_001', 0, function () { it('GetEuid_test_001', 0, function () {
var that = new process.Process() var result = process.getEuid
var result = that.getEuid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -282,9 +277,8 @@ describe('ChildProcessTest', function () { ...@@ -282,9 +277,8 @@ describe('ChildProcessTest', function () {
}) })
it('GetEuid_test_002', 0, function () { it('GetEuid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){ for(var i = 0; i < 3; i++){
var result = that.getEuid var result = process.getEuid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = true var flag = true
...@@ -296,8 +290,7 @@ describe('ChildProcessTest', function () { ...@@ -296,8 +290,7 @@ describe('ChildProcessTest', function () {
// process GetEgid test // process GetEgid test
it('GetEgid_test_001', 0, function () { it('GetEgid_test_001', 0, function () {
var that = new process.Process() var result = process.getEgid
var result = that.getEgid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -305,9 +298,8 @@ describe('ChildProcessTest', function () { ...@@ -305,9 +298,8 @@ describe('ChildProcessTest', function () {
}) })
it('GetEgid_test_002', 0, function () { it('GetEgid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){ for(var i = 0; i < 3; i++){
var result = that.getEgid var result = process.getEgid
if(result != null) { if(result != null) {
if(result > 0) { if(result > 0) {
var flag = true var flag = true
...@@ -319,8 +311,7 @@ describe('ChildProcessTest', function () { ...@@ -319,8 +311,7 @@ describe('ChildProcessTest', function () {
// process GetGroups test // process GetGroups test
it('GetGroups_test_001', 0, function () { it('GetGroups_test_001', 0, function () {
var that = new process.Process() var result = process.getGroups
var result = that.getGroups
var len = result.length var len = result.length
if(len > 0) { if(len > 0) {
var flag = true var flag = true
...@@ -329,9 +320,8 @@ describe('ChildProcessTest', function () { ...@@ -329,9 +320,8 @@ describe('ChildProcessTest', function () {
}) })
it('GetGroups_test_002', 0, function () { it('GetGroups_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){ for(var i = 0; i < 3; i++){
var result = that.getGroups var result = process.getGroups
if(result != null) { if(result != null) {
var len = result.length var len = result.length
if(len > 0) { if(len > 0) {
...@@ -344,92 +334,81 @@ describe('ChildProcessTest', function () { ...@@ -344,92 +334,81 @@ describe('ChildProcessTest', function () {
// process chdir test // process chdir test
it('chdir_test_001', 0, function () { it('chdir_test_001', 0, function () {
var that = new process.Process() var result = process.chdir('/system')
var result = that.chdir('/system') var result1 = process.cwd()
var result1 = that.cwd()
expect(result1).assertEqual('/system') expect(result1).assertEqual('/system')
}) })
it('chdir_test_002', 0, function () { it('chdir_test_002', 0, function () {
var that = new process.Process() var result = process.chdir('/system/lib')
var result = that.chdir('/system/lib') var result1 = process.cwd()
var result1 = that.cwd()
expect(result1).assertEqual('/system/lib') expect(result1).assertEqual('/system/lib')
}) })
it('chdir_test_003', 0, function () { it('chdir_test_003', 0, function () {
var that = new process.Process() var result = process.chdir('/..')
var result = that.chdir('/..') var result1 = process.cwd()
var result1 = that.cwd()
expect(result1).assertEqual('/') expect(result1).assertEqual('/')
}) })
// process kill test // process kill test
it('kill_test_001', 0, function () { it('kill_test_001', 0, function () {
var that = new process.Process() var result = process.kill(123, 3)
var result = that.kill(123, 3)
expect(result).assertEqual(false) expect(result).assertEqual(false)
}) })
it('kill_test_002', 0, function () { it('kill_test_002', 0, function () {
var that = new process.Process() var pres = process.getPid
var pres = that.getPid var result = process.kill(pres, 23)
var result = that.kill(pres, 23)
expect(result).assertEqual(true) expect(result).assertEqual(true)
}) })
it('kill_test_003', 0, function () { it('kill_test_003', 0, function () {
var that = new process.Process() var pres = process.getPid
var pres = that.getPid var result = process.kill(pres, 28)
var result = that.kill(pres, 28)
expect(result).assertEqual(true) expect(result).assertEqual(true)
}) })
it('kill_test_004', 0, function () { it('kill_test_004', 0, function () {
var that = new process.Process() var pres = process.getPid
var pres = that.getPid var result = process.kill(pres, 17)
var result = that.kill(pres, 17)
expect(result).assertEqual(true) expect(result).assertEqual(true)
}) })
// process uptime test // process uptime test
it('uptime_test_001', 0, function () { it('uptime_test_001', 0, function () {
var that = new process.Process() var result1 = process.uptime()
var result1 = that.uptime()
function sleep(d){ function sleep(d){
while(that.uptime() - result1 <= d); while(process.uptime() - result1 <= d);
} }
sleep(5); sleep(5);
var result2 = that.uptime() - 6 var result2 = process.uptime() - 6
expect(result1).assertEqual(result2) expect(result1).assertEqual(result2)
}) })
it('uptime_test_002', 0, function () { it('uptime_test_002', 0, function () {
var that = new process.Process() var result1 = process.uptime()
var result1 = that.uptime()
function sleep(d){ function sleep(d){
while(that.uptime() - result1 <= d); while(process.uptime() - result1 <= d);
} }
sleep(8); sleep(8);
var result2 = that.uptime() - 9 var result2 = process.uptime() - 9
expect(result1).assertEqual(result2) expect(result1).assertEqual(result2)
}) })
it('uptime_test_003', 0, function () { it('uptime_test_003', 0, function () {
var that = new process.Process() var result1 = process.uptime()
var result1 = that.uptime()
function sleep(d){ function sleep(d){
while(that.uptime() - result1 <= d); while(process.uptime() - result1 <= d);
} }
sleep(10); sleep(10);
var result2 = that.uptime() - 11 var result2 = process.uptime() - 11
expect(result1).assertEqual(result2) expect(result1).assertEqual(result2)
}) })
// process pid test // process pid test
it('pid_test_001', 0, function () { it('pid_test_001', 0, function () {
var that = new process.Process() var result = process.getPid
var result = that.getPid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -437,10 +416,9 @@ describe('ChildProcessTest', function () { ...@@ -437,10 +416,9 @@ describe('ChildProcessTest', function () {
}) })
it('pid_test_002', 0, function () { it('pid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++) for(var i = 0; i < 3; i++)
{ {
var result = that.getPid var result = process.getPid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -450,8 +428,7 @@ describe('ChildProcessTest', function () { ...@@ -450,8 +428,7 @@ describe('ChildProcessTest', function () {
// process ppid test // process ppid test
it('ppid_test_001', 0, function () { it('ppid_test_001', 0, function () {
var that = new process.Process() var result = process.getPpid
var result = that.getPpid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -459,10 +436,9 @@ describe('ChildProcessTest', function () { ...@@ -459,10 +436,9 @@ describe('ChildProcessTest', function () {
}) })
it('ppid_test_002', 0, function () { it('ppid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++) for(var i = 0; i < 3; i++)
{ {
var result = that.getPpid var result = process.getPpid
if(result > 0) { if(result > 0) {
var flag = true var flag = true
} }
...@@ -472,44 +448,39 @@ describe('ChildProcessTest', function () { ...@@ -472,44 +448,39 @@ describe('ChildProcessTest', function () {
// process cwd test // process cwd test
it('cwd_test_001', 0, function () { it('cwd_test_001', 0, function () {
var that =new process.Process() var cwd = process.cwd()
var cwd = that.cwd()
expect(cwd).assertEqual('/') expect(cwd).assertEqual('/')
}) })
it('cwd_test_002', 0, function () { it('cwd_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++) for(var i = 0; i < 3; i++)
{ {
var cwd = that.cwd() var cwd = process.cwd()
expect(cwd).assertEqual('/') expect(cwd).assertEqual('/')
} }
}) })
// process on test // process on test
it('on_test_001', 0, function () { it('on_test_001', 0, function () {
var that = new process.Process()
function add(){ function add(){
var value = 3 + 2 var value = 3 + 2
} }
var ontest = that.on(1, add) var ontest = process.on(1, add)
expect(ontest).assertEqual(false) expect(ontest).assertEqual(false)
}) })
it('on_test_002', 0, function () { it('on_test_002', 0, function () {
var that = new process.Process()
function add1(num){ function add1(num){
var value = num + 3 var value = num + 3
} }
var on = that.on("add123", add1) var on = process.on("add123", add1)
}) })
it('on_test_003', 0, function () { it('on_test_003', 0, function () {
var that = new process.Process()
function add2(num0, num1){ function add2(num0, num1){
var value = num0 + num1 var value = num0 + num1
} }
var ontest = that.on(879, add2) var ontest = process.on(879, add2)
expect(ontest).assertEqual(false) expect(ontest).assertEqual(false)
}) })
}) })
\ No newline at end of file
...@@ -10,9 +10,29 @@ ...@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("url_js_test") {
hap_profile = "./src/main/config.json"
deps = [
":url_js_assets",
":url_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "UrlJsTest"
ohos_js_hap_suite("startup_url_js_test") { # part_name = "prebuilt_hap"
test_hap_name = "StartupUrlJSApiTest" # subsystem_name = "xts"
hap_source_path = "hap/entry-debug-rich-unsigned.hap" }
ohos_js_assets("url_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("url_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"startup_url_js_test.hap" "UrlJsTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -10,9 +10,29 @@ ...@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("util_js_test") {
hap_profile = "./src/main/config.json"
deps = [
":util_js_assets",
":util_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "UtilJsTest"
ohos_js_hap_suite("startup_util_js_test") { # part_name = "prebuilt_hap"
test_hap_name = "StartupUtilJSApiTest" # subsystem_name = "xts"
hap_source_path = "hap/entry-debug-rich-unsigned.hap" }
ohos_js_assets("util_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("util_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"startup_util_js_test.hap" "UtilJsTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
...@@ -10,9 +10,29 @@ ...@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and # See the License for the specific language governing permissions and
# limitations under the License. # limitations under the License.
import("//test/xts/tools/build/suite.gni") import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("worker_js_hap") {
hap_profile = "./src/main/config.json"
deps = [
":worker_js_assets",
":worker_resources",
]
# shared_libraries = [
# "//third_party/giflib:libgif",
# "//third_party/libpng:libpng",
# ]
certificate_profile = "./signature/openharmony_sx.p7b"
hap_name = "WorkerJSTest"
ohos_js_hap_suite("startup_worker_js_test") { # part_name = "prebuilt_hap"
test_hap_name = "StartupWorkerJSApiTest" # subsystem_name = "xts"
hap_source_path = "hap/entry-debug-standard-unsigned.hap" }
ohos_js_assets("worker_js_assets") {
source_dir = "./src/main/js/default"
}
ohos_resources("worker_resources") {
sources = [ "./src/main/resources" ]
hap_profile = "./src/main/config.json"
} }
...@@ -9,7 +9,7 @@ ...@@ -9,7 +9,7 @@
"kits": [ "kits": [
{ {
"test-file-name": [ "test-file-name": [
"startup_worker_js_test.hap" "WorkerJSTest.hap"
], ],
"type": "AppInstallKit", "type": "AppInstallKit",
"cleanup-apps": true "cleanup-apps": true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册