提交 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 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
group("jsapi") {
group("compileruntime") {
testonly = true
if (is_standard_system) {
deps = [
"StartupProcessJSApiTest:startup_process_js_test",
"StartupUrlJSApiTest:startup_url_js_test",
"StartupUtilJSApiTest:startup_util_js_test",
"StartupWorkerJSApiTest:startup_worker_js_test",
"process_lib_standard:process_js_test",
"url_lib_standard:url_js_test",
"util_lib_standard:util_js_test",
"worker_lib_standard:worker_js_hap",
]
}
}
......@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("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") {
test_hap_name = "StartupProcessJSApiTest"
hap_source_path = "hap/entry-debug-rich-unsigned.hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
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 @@
"kits": [
{
"test-file-name": [
"StartupProcessJSApiTest.hap"
"ProcessJSApiTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
......@@ -227,8 +227,7 @@ describe('ChildProcessTest', function () {
// process GetUid test
it('GetUid_test_001', 0, function () {
var that = new process.Process()
var result = that.getUid
var result = process.getUid
if(result > 0) {
var flag = true
}
......@@ -236,9 +235,8 @@ describe('ChildProcessTest', function () {
})
it('GetUid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){
var result = that.getUid
var result = process.getUid
if(result != null) {
if(result > 0) {
var flag = true
......@@ -250,8 +248,7 @@ describe('ChildProcessTest', function () {
// process GetGid test
it('GetGid_test_001', 0, function () {
var that = new process.Process()
var result = that.getGid
var result = process.getGid
if(result > 0) {
var flag = true
}
......@@ -259,9 +256,8 @@ describe('ChildProcessTest', function () {
})
it('GetGid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){
var result = that.getGid
var result = process.getGid
if(result != null) {
if(result > 0) {
var flag = true
......@@ -273,8 +269,7 @@ describe('ChildProcessTest', function () {
// process GetEuid test
it('GetEuid_test_001', 0, function () {
var that = new process.Process()
var result = that.getEuid
var result = process.getEuid
if(result > 0) {
var flag = true
}
......@@ -282,9 +277,8 @@ describe('ChildProcessTest', function () {
})
it('GetEuid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){
var result = that.getEuid
var result = process.getEuid
if(result != null) {
if(result > 0) {
var flag = true
......@@ -296,8 +290,7 @@ describe('ChildProcessTest', function () {
// process GetEgid test
it('GetEgid_test_001', 0, function () {
var that = new process.Process()
var result = that.getEgid
var result = process.getEgid
if(result > 0) {
var flag = true
}
......@@ -305,9 +298,8 @@ describe('ChildProcessTest', function () {
})
it('GetEgid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){
var result = that.getEgid
var result = process.getEgid
if(result != null) {
if(result > 0) {
var flag = true
......@@ -319,8 +311,7 @@ describe('ChildProcessTest', function () {
// process GetGroups test
it('GetGroups_test_001', 0, function () {
var that = new process.Process()
var result = that.getGroups
var result = process.getGroups
var len = result.length
if(len > 0) {
var flag = true
......@@ -329,9 +320,8 @@ describe('ChildProcessTest', function () {
})
it('GetGroups_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++){
var result = that.getGroups
var result = process.getGroups
if(result != null) {
var len = result.length
if(len > 0) {
......@@ -344,92 +334,81 @@ describe('ChildProcessTest', function () {
// process chdir test
it('chdir_test_001', 0, function () {
var that = new process.Process()
var result = that.chdir('/system')
var result1 = that.cwd()
var result = process.chdir('/system')
var result1 = process.cwd()
expect(result1).assertEqual('/system')
})
it('chdir_test_002', 0, function () {
var that = new process.Process()
var result = that.chdir('/system/lib')
var result1 = that.cwd()
var result = process.chdir('/system/lib')
var result1 = process.cwd()
expect(result1).assertEqual('/system/lib')
})
it('chdir_test_003', 0, function () {
var that = new process.Process()
var result = that.chdir('/..')
var result1 = that.cwd()
var result = process.chdir('/..')
var result1 = process.cwd()
expect(result1).assertEqual('/')
})
// process kill test
it('kill_test_001', 0, function () {
var that = new process.Process()
var result = that.kill(123, 3)
var result = process.kill(123, 3)
expect(result).assertEqual(false)
})
it('kill_test_002', 0, function () {
var that = new process.Process()
var pres = that.getPid
var result = that.kill(pres, 23)
var pres = process.getPid
var result = process.kill(pres, 23)
expect(result).assertEqual(true)
})
it('kill_test_003', 0, function () {
var that = new process.Process()
var pres = that.getPid
var result = that.kill(pres, 28)
var pres = process.getPid
var result = process.kill(pres, 28)
expect(result).assertEqual(true)
})
it('kill_test_004', 0, function () {
var that = new process.Process()
var pres = that.getPid
var result = that.kill(pres, 17)
var pres = process.getPid
var result = process.kill(pres, 17)
expect(result).assertEqual(true)
})
// process uptime test
it('uptime_test_001', 0, function () {
var that = new process.Process()
var result1 = that.uptime()
var result1 = process.uptime()
function sleep(d){
while(that.uptime() - result1 <= d);
while(process.uptime() - result1 <= d);
}
sleep(5);
var result2 = that.uptime() - 6
var result2 = process.uptime() - 6
expect(result1).assertEqual(result2)
})
it('uptime_test_002', 0, function () {
var that = new process.Process()
var result1 = that.uptime()
var result1 = process.uptime()
function sleep(d){
while(that.uptime() - result1 <= d);
while(process.uptime() - result1 <= d);
}
sleep(8);
var result2 = that.uptime() - 9
var result2 = process.uptime() - 9
expect(result1).assertEqual(result2)
})
it('uptime_test_003', 0, function () {
var that = new process.Process()
var result1 = that.uptime()
var result1 = process.uptime()
function sleep(d){
while(that.uptime() - result1 <= d);
while(process.uptime() - result1 <= d);
}
sleep(10);
var result2 = that.uptime() - 11
var result2 = process.uptime() - 11
expect(result1).assertEqual(result2)
})
// process pid test
it('pid_test_001', 0, function () {
var that = new process.Process()
var result = that.getPid
var result = process.getPid
if(result > 0) {
var flag = true
}
......@@ -437,10 +416,9 @@ describe('ChildProcessTest', function () {
})
it('pid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++)
{
var result = that.getPid
var result = process.getPid
if(result > 0) {
var flag = true
}
......@@ -450,8 +428,7 @@ describe('ChildProcessTest', function () {
// process ppid test
it('ppid_test_001', 0, function () {
var that = new process.Process()
var result = that.getPpid
var result = process.getPpid
if(result > 0) {
var flag = true
}
......@@ -459,10 +436,9 @@ describe('ChildProcessTest', function () {
})
it('ppid_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++)
{
var result = that.getPpid
var result = process.getPpid
if(result > 0) {
var flag = true
}
......@@ -472,44 +448,39 @@ describe('ChildProcessTest', function () {
// process cwd test
it('cwd_test_001', 0, function () {
var that =new process.Process()
var cwd = that.cwd()
var cwd = process.cwd()
expect(cwd).assertEqual('/')
})
it('cwd_test_002', 0, function () {
var that = new process.Process()
for(var i = 0; i < 3; i++)
{
var cwd = that.cwd()
var cwd = process.cwd()
expect(cwd).assertEqual('/')
}
})
// process on test
it('on_test_001', 0, function () {
var that = new process.Process()
function add(){
var value = 3 + 2
}
var ontest = that.on(1, add)
var ontest = process.on(1, add)
expect(ontest).assertEqual(false)
})
it('on_test_002', 0, function () {
var that = new process.Process()
function add1(num){
var value = num + 3
}
var on = that.on("add123", add1)
var on = process.on("add123", add1)
})
it('on_test_003', 0, function () {
var that = new process.Process()
function add2(num0, num1){
var value = num0 + num1
}
var ontest = that.on(879, add2)
var ontest = process.on(879, add2)
expect(ontest).assertEqual(false)
})
})
\ No newline at end of file
......@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("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") {
test_hap_name = "StartupUrlJSApiTest"
hap_source_path = "hap/entry-debug-rich-unsigned.hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
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 @@
"kits": [
{
"test-file-name": [
"startup_url_js_test.hap"
"UrlJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
......@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("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") {
test_hap_name = "StartupUtilJSApiTest"
hap_source_path = "hap/entry-debug-rich-unsigned.hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
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 @@
"kits": [
{
"test-file-name": [
"startup_util_js_test.hap"
"UtilJsTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
......@@ -10,9 +10,29 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
import("//test/xts/tools/build/suite.gni")
ohos_js_hap_suite("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") {
test_hap_name = "StartupWorkerJSApiTest"
hap_source_path = "hap/entry-debug-standard-unsigned.hap"
# part_name = "prebuilt_hap"
# subsystem_name = "xts"
}
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 @@
"kits": [
{
"test-file-name": [
"startup_worker_js_test.hap"
"WorkerJSTest.hap"
],
"type": "AppInstallKit",
"cleanup-apps": true
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册