From 1a81a9a8b2a44759618e4cd26f3b0941331e015e Mon Sep 17 00:00:00 2001 From: msojocs Date: Sat, 6 Jul 2024 22:17:25 +0800 Subject: [PATCH] test --- test/runner/nwjs/module-prepare.sh | 8 +++++++- test/spec/wcc/module/module.spec.ts | 7 +------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/test/runner/nwjs/module-prepare.sh b/test/runner/nwjs/module-prepare.sh index b1ab9fb..92b6d0d 100755 --- a/test/runner/nwjs/module-prepare.sh +++ b/test/runner/nwjs/module-prepare.sh @@ -37,7 +37,6 @@ docker run -d -i\ --env=XVFB_SCREEN=0\ --env=XVFB_RESOLUTION=320x240x8\ --env=DISPLAY=:95\ - --rm\ --hostname=DESKTOP-1TV4OA1\ --name=wine\ --shm-size=1g\ @@ -47,9 +46,16 @@ docker run -d -i\ -p 8083:8083\ scottyhardy/docker-wine:latest\ wine /workspace/cache/nwjs-sdk-v$nw_version-win-x64/nw.exe +i=0 until $(curl --output /dev/null --silent --head --fail http://127.0.0.1:8083/check); do printf '.' curl http://127.0.0.1:8083/check sleep 1 + let i=$i+1 + if [ $i -ge 5 ];then + echo "error" + docker ps -a + exit 1 + fi done echo "success" \ No newline at end of file diff --git a/test/spec/wcc/module/module.spec.ts b/test/spec/wcc/module/module.spec.ts index aa12968..aca55b3 100644 --- a/test/spec/wcc/module/module.spec.ts +++ b/test/spec/wcc/module/module.spec.ts @@ -6,13 +6,8 @@ import linux from '../../../runner/module-linux' import windows from '../../../runner/module-windows' import * as fs from 'fs' +windows.start() describe("wcc - module", function () { - this.beforeAll(function(done) { - this.timeout(120000) - windows.start() - console.log('start success!') - done() - }) this.afterAll(() => { windows.close() })