diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index aedaa82..993bed2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,9 +12,9 @@ jobs: os: [ ubuntu-latest, windows-latest, macos-latest ] # The versions should contain (at least) the lowest requirement # and a version that is more up to date. - toit-version: [ v2.0.0-alpha.150, latest ] + toit-version: [ v2.0.0-alpha.170, latest ] include: - - toit-version: v2.0.0-alpha.150 + - toit-version: v2.0.0-alpha.170 version-name: old - toit-version: latest version-name: new diff --git a/examples/package.lock b/examples/package.lock index 8bca916..d208d54 100644 --- a/examples/package.lock +++ b/examples/package.lock @@ -8,5 +8,5 @@ packages: toit-cert-roots: url: github.com/toitware/toit-cert-roots name: certificate-roots - version: 1.9.0 + version: 1.10.0 hash: 1445c4a6cae47689674ae02c5f1dc03660f1df8c diff --git a/examples/package.yaml b/examples/package.yaml index 9d0ed84..0fc0e39 100644 --- a/examples/package.yaml +++ b/examples/package.yaml @@ -1,6 +1,6 @@ dependencies: certificate_roots: url: github.com/toitware/toit-cert-roots - version: ^1.9.0 + version: ^1.10.0 http: path: .. diff --git a/package.lock b/package.lock new file mode 100644 index 0000000..3939b1f --- /dev/null +++ b/package.lock @@ -0,0 +1 @@ +sdk: ^2.0.0-alpha.170 diff --git a/package.yaml b/package.yaml index 7b7636f..9246a55 100644 --- a/package.yaml +++ b/package.yaml @@ -1,4 +1,4 @@ name: http description: An HTTP server and client. environment: - sdk: ^2.0.0-alpha.150 + sdk: ^2.0.0-alpha.170 diff --git a/tests/package.lock b/tests/package.lock index e4a5031..688dea2 100644 --- a/tests/package.lock +++ b/tests/package.lock @@ -1,4 +1,4 @@ -sdk: ^2.0.0-alpha.150 +sdk: ^2.0.0-alpha.170 prefixes: certificate_roots: toit-cert-roots fs: pkg-fs @@ -17,10 +17,10 @@ packages: pkg-host: url: github.com/toitlang/pkg-host name: host - version: 1.15.3 - hash: 62393e8522b77eafbafe60b9817935266117daf6 + version: 1.16.2 + hash: ae83f761db80166a20bb38498edd009916b72563 toit-cert-roots: url: github.com/toitware/toit-cert-roots name: certificate-roots - version: 1.9.0 + version: 1.10.0 hash: 1445c4a6cae47689674ae02c5f1dc03660f1df8c diff --git a/tests/package.yaml b/tests/package.yaml index dd9af95..a4f808f 100644 --- a/tests/package.yaml +++ b/tests/package.yaml @@ -1,12 +1,12 @@ dependencies: certificate_roots: url: github.com/toitware/toit-cert-roots - version: ^1.9.0 + version: ^1.10.0 fs: url: github.com/toitlang/pkg-fs version: ^2.3.1 host: url: github.com/toitlang/pkg-host - version: ^1.15.3 + version: ^1.16.2 http: path: .. diff --git a/tests/webdriver.toit b/tests/webdriver.toit index 75ca64a..8194c49 100644 --- a/tests/webdriver.toit +++ b/tests/webdriver.toit @@ -19,7 +19,7 @@ DRIVERS_ ::= { class WebDriver: driver-app_/string - child-process_/any := null + child-process_/pipe.Process? := null session-url_/string? := null network_/net.Interface? := null client_/http.Client? := null @@ -40,14 +40,10 @@ class WebDriver: "$program-dir/third-party/ephemeral-port-reserve/ephemeral_port_reserve.py" port = port.trim command := ["$driver-app_$extension", "--port=$port"] - fork-data := pipe.fork - true // use_path - pipe.PIPE-INHERITED // stdin. - pipe.PIPE-INHERITED // stdout - pipe.PIPE-INHERITED // stderr + child-process_ = pipe.fork + --use-path command.first command - child-process_ = fork-data[3] network_ = net.open client_ = http.Client network_ @@ -106,8 +102,9 @@ class WebDriver: print "Started" close: - pid := child-process_ - if not pid: return + child-process := child-process_ + if not child-process: return + pid := child-process.pid // Delete the session. // This doesn't shut down the driver, but is good practice. request := client_.new-request http.DELETE --uri=session-url_ @@ -125,7 +122,7 @@ class WebDriver: pipe.kill_ pid 15 exception := catch --unwind=(: it != DEADLINE-EXCEEDED-ERROR): with-timeout --ms=3_000: - pipe.wait-for pid + child-process.wait if exception: pipe.kill_ pid 9