From df6f974ecaa9f79f6df176387a35aae71370d8d2 Mon Sep 17 00:00:00 2001 From: link2xt Date: Thu, 26 Oct 2023 19:45:14 +0000 Subject: [PATCH] Add scripts for running deltachat-rpc-client tests --- scripts/README.md | 15 +++++++++++---- scripts/make-rpc-testenv.sh | 6 ++++++ scripts/run-rpc-test.sh | 4 ++++ 3 files changed, 21 insertions(+), 4 deletions(-) create mode 100755 scripts/make-rpc-testenv.sh create mode 100755 scripts/run-rpc-test.sh diff --git a/scripts/README.md b/scripts/README.md index 551d7e77a..cf11364bb 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -14,16 +14,23 @@ and an own build machine. - `../.github/workflows` contains jobs run by GitHub Actions. +- `run-python-test.sh` runs CFFI Python tests. + +- `run-rpc-test.sh` runs JSON-RPC Python tests. + +- `make-python-testenv.sh` creates a local python test development environment with CFFI bindings. + Reusing the same environment is faster than running `run-python-test.sh` which always + recreates environment from scratch and runs additional lints. + +- `make-rpc-testenv.sh` creates a local python development environment with JSON-RPC bindings, + i.e. `deltachat-rpc-client` and `deltachat-rpc-server`. + - `remote_tests_python.sh` rsyncs to a build machine and runs `run-python-test.sh` remotely on the build machine. - `remote_tests_rust.sh` rsyncs to the build machine and runs `run-rust-test.sh` remotely on the build machine. -- `make-python-testenv.sh` creates local python test development environment. - Reusing the same environment is faster than running `run-python-test.sh` which always - recreates environment from scratch and runs additional lints. - - `run-doxygen.sh` generates C-docs which are then uploaded to https://c.delta.chat/ - `run_all.sh` builds Python wheels diff --git a/scripts/make-rpc-testenv.sh b/scripts/make-rpc-testenv.sh new file mode 100755 index 000000000..d194bc854 --- /dev/null +++ b/scripts/make-rpc-testenv.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail + +tox -c deltachat-rpc-client -e py --devenv venv +venv/bin/pip install --upgrade pip +cargo install --path deltachat-rpc-server/ --root "$PWD/venv" diff --git a/scripts/run-rpc-test.sh b/scripts/run-rpc-test.sh new file mode 100755 index 000000000..9617bb09c --- /dev/null +++ b/scripts/run-rpc-test.sh @@ -0,0 +1,4 @@ +#!/usr/bin/env bash +set -euo pipefail +cargo install --path deltachat-rpc-server/ --root "$PWD/venv" +PATH="$PWD/venv/bin:$PATH" tox -c deltachat-rpc-client