mirror of
https://github.com/AsamK/signal-cli
synced 2025-08-29 10:30:38 +00:00
Update native-image handling in tests
This commit is contained in:
parent
477e6516ed
commit
f0fe1fac66
2 changed files with 25 additions and 6 deletions
|
@ -2960,6 +2960,15 @@
|
||||||
{"name":"unidentifiedStatus_"}
|
{"name":"unidentifiedStatus_"}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
{
|
||||||
|
"name":"org.whispersystems.signalservice.internal.push.SignalServiceProtos$SyncMessage$Sent$StoryMessageRecipient",
|
||||||
|
"fields":[
|
||||||
|
{"name":"bitField0_"},
|
||||||
|
{"name":"destinationUuid_"},
|
||||||
|
{"name":"distributionListIds_"},
|
||||||
|
{"name":"isAllowedToReply_"}
|
||||||
|
]
|
||||||
|
},
|
||||||
{
|
{
|
||||||
"name":"org.whispersystems.signalservice.internal.push.SignalServiceProtos$SyncMessage$Sent$UnidentifiedDeliveryStatus",
|
"name":"org.whispersystems.signalservice.internal.push.SignalServiceProtos$SyncMessage$Sent$UnidentifiedDeliveryStatus",
|
||||||
"fields":[
|
"fields":[
|
||||||
|
|
22
run_tests.sh
22
run_tests.sh
|
@ -5,12 +5,6 @@ if [ $# -ne 2 ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
# To update graalvm config, set GRAALVM_HOME, e.g:
|
|
||||||
# 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
|
|
||||||
|
|
||||||
NUMBER_1="$1"
|
NUMBER_1="$1"
|
||||||
NUMBER_2="$2"
|
NUMBER_2="$2"
|
||||||
|
@ -36,6 +30,13 @@ else
|
||||||
fi
|
fi
|
||||||
|
|
||||||
run() {
|
run() {
|
||||||
|
# To update graalvm config, set GRAALVM_HOME, e.g:
|
||||||
|
# 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-${SIGNAL_CLI_AGENT_ID}/"
|
||||||
|
fi
|
||||||
|
|
||||||
set -x
|
set -x
|
||||||
if [ "$JSON_RPC" -eq 1 ]; then
|
if [ "$JSON_RPC" -eq 1 ]; then
|
||||||
"$SIGNAL_CLI" $@
|
"$SIGNAL_CLI" $@
|
||||||
|
@ -46,19 +47,23 @@ run() {
|
||||||
}
|
}
|
||||||
|
|
||||||
run_main() {
|
run_main() {
|
||||||
|
export SIGNAL_CLI_AGENT_ID=main
|
||||||
if [ "$JSON_RPC" -eq 1 ]; then
|
if [ "$JSON_RPC" -eq 1 ]; then
|
||||||
run --json-rpc-socket="$XDG_RUNTIME_DIR/signal-cli/socket" $@
|
run --json-rpc-socket="$XDG_RUNTIME_DIR/signal-cli/socket" $@
|
||||||
else
|
else
|
||||||
run --config="$PATH_MAIN" $@
|
run --config="$PATH_MAIN" $@
|
||||||
fi
|
fi
|
||||||
|
unset SIGNAL_CLI_AGENT_ID
|
||||||
}
|
}
|
||||||
|
|
||||||
run_linked() {
|
run_linked() {
|
||||||
|
export SIGNAL_CLI_AGENT_ID=linked
|
||||||
if [ "$JSON_RPC" -eq 1 ]; then
|
if [ "$JSON_RPC" -eq 1 ]; then
|
||||||
run --json-rpc-tcp="127.0.0.1:7583" $@
|
run --json-rpc-tcp="127.0.0.1:7583" $@
|
||||||
else
|
else
|
||||||
run --config="$PATH_LINK" $@
|
run --config="$PATH_LINK" $@
|
||||||
fi
|
fi
|
||||||
|
unset SIGNAL_CLI_AGENT_ID
|
||||||
}
|
}
|
||||||
|
|
||||||
register() {
|
register() {
|
||||||
|
@ -227,3 +232,8 @@ run_main -a "$NUMBER_1" removeDevice -d 2
|
||||||
## Unregister
|
## Unregister
|
||||||
run_main -a "$NUMBER_1" unregister
|
run_main -a "$NUMBER_1" unregister
|
||||||
run_main -a "$NUMBER_2" unregister --delete-account
|
run_main -a "$NUMBER_2" unregister --delete-account
|
||||||
|
|
||||||
|
if [ ! -z "$GRAALVM_HOME" ]; then
|
||||||
|
"$GRAALVM_HOME"/lib/svm/bin/native-image-configure generate --input-dir=graalvm-config-dir/ --input-dir=graalvm-config-dir-linked/ --input-dir=graalvm-config-dir-main/ --output-dir=graalvm-config-dir//
|
||||||
|
rm -r graalvm-config-dir-main graalvm-config-dir-linked
|
||||||
|
fi
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue