X-Git-Url: https://git.nmode.ca/signal-cli/blobdiff_plain/7106a997cf2f2d8325ae4e11dfb8424aa60999eb..ce70a623c21a267679d59838d041f9bc1d486cd9:/run_tests.sh diff --git a/run_tests.sh b/run_tests.sh index 4ee46845..b41a460d 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -6,22 +6,27 @@ fi set -e # To update graalvm config, set GRAALVM_HOME, e.g: -# export GRAALVM_HOME=/usr/lib/jvm/java-11-graalvm +# export GRAALVM_HOME=/usr/lib/jvm/java-17-graalvm if [ ! -z "$GRAALVM_HOME" ]; then export JAVA_HOME=$GRAALVM_HOME export SIGNAL_CLI_OPTS='-agentlib:native-image-agent=config-merge-dir=graalvm-config-dir/' fi -export SIGNAL_CLI="$PWD/build/install/signal-cli/bin/signal-cli" NUMBER_1="$1" NUMBER_2="$2" TEST_PIN_1=456test_pin_foo123 +NATIVE=0 PATH_TEST_CONFIG="$PWD/build/test-config" PATH_MAIN="$PATH_TEST_CONFIG/main" PATH_LINK="$PATH_TEST_CONFIG/link" -./gradlew installDist +if [ "$NATIVE" -eq 1 ]; then + SIGNAL_CLI="$PWD/build/native/nativeCompile/signal-cli" +else + ./gradlew installDist + SIGNAL_CLI="$PWD/build/install/signal-cli/bin/signal-cli" +fi run() { set -x @@ -40,7 +45,7 @@ run_linked() { register() { NUMBER=$1 PIN=$2 - echo -n "Enter a captcha token (https://signalcaptchas.org/registration/generate.html): " + echo -n "Enter a captcha token (https://signalcaptchas.org/staging/challenge/generate.html): " read CAPTCHA run_main -u "$NUMBER" register --captcha "$CAPTCHA" echo -n "Enter validation code for ${NUMBER}: " @@ -76,6 +81,17 @@ register "$NUMBER_2" sleep 5 + +## DBus +#run_main -u "$NUMBER_1" --dbus send "$NUMBER_2" -m daemon_not_running || true +#run_main daemon & +#DAEMON_PID=$! +#sleep 10 +#run_main -u "$NUMBER_1" --dbus send "$NUMBER_2" -m hii +#run_main -u "$NUMBER_2" --dbus receive +#kill "$DAEMON_PID" + + # JSON-RPC FIFO_FILE="${PATH_MAIN}/dbus-fifo" @@ -136,8 +152,8 @@ run_main -u "$NUMBER_2" listGroups -d run_main -u "$NUMBER_2" --output=json listGroups -d run_main -u "$NUMBER_1" receive run_main -u "$NUMBER_1" updateGroup -g "$GROUP_ID" -m "$NUMBER_2" -run_main -u "$NUMBER_1" block "$GROUP_ID" -run_main -u "$NUMBER_1" unblock "$GROUP_ID" +run_main -u "$NUMBER_1" --verbose block -g "$GROUP_ID" +run_main -u "$NUMBER_1" --verbose unblock -g "$GROUP_ID" ## Identities run_main -u "$NUMBER_1" listIdentities @@ -179,15 +195,6 @@ done run_main -u "$NUMBER_1" removeDevice -d 2 -## DBus -#run_main -u "$NUMBER_1" --dbus send "$NUMBER_2" -m daemon_not_running -#run_main daemon & -#DAEMON_PID=$! -#sleep 5 -#run_main -u "$NUMBER_1" --dbus send "$NUMBER_2" -m hii -#run_main -u "$NUMBER_2" --dbus receive -#kill "$DAEMON_PID" - ## Unregister run_main -u "$NUMBER_1" unregister run_main -u "$NUMBER_2" unregister --delete-account