forked from Unity-Technologies/UnityRenderStreaming
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_package_mac.sh
More file actions
executable file
·69 lines (57 loc) · 1.39 KB
/
Copy pathtest_package_mac.sh
File metadata and controls
executable file
·69 lines (57 loc) · 1.39 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#!/bin/bash
#
# BOKKEN_DEVICE_IP:
# TEMPLATE_FILE:
# TEST_TARGET:
# TEST_PLATFORM:
# SCRIPTING_BACKEND:
# EXTRA_UTR_ARG:
# PACKAGE_DIR:
# TEST_PROJECT_DIR:
# TEST_RESULT_DIR:
# EDITOR_VERSION:
#
#
# brew install gettext
#
export IDENTITY=~/.ssh/id_rsa_macmini
# install envsubst command
brew install gettext
# render template
envsubst ' \
$BOKKEN_DEVICE_IP \
$WEBAPP_DIR \
$WEBAPP_NAME \
$SCRIPTING_BACKEND \
$EXTRA_UTR_ARG \
$PLAYER_LOAD_PATH \
$TEST_PROJECT_DIR \
$TEST_TARGET \
$TEST_PLATFORM \
$TEST_ARCHITECTURE \
$EDITOR_VERSION' \
< ${TEMPLATE_FILE} \
> ~/remote.sh
chmod +x ~/remote.sh
# copy shell script to remote machine
scp -i ${IDENTITY} -r ~/remote.sh bokken@${BOKKEN_DEVICE_IP}:~/remote.sh
if [ ${TEST_PLATFORM} = "standalone" ]
then
# copy build player to remote machine
# note: need to copy webserver.exe to the remote machine
scp -i ${IDENTITY} -r build bokken@${BOKKEN_DEVICE_IP}:~/
fi
# copy package to remote machine
scp -i ${IDENTITY} -r ${YAMATO_SOURCE_DIR} bokken@${BOKKEN_DEVICE_IP}:~/${PACKAGE_DIR}
set +e
# run remote.sh on the remote machine
ssh -i ${IDENTITY} bokken@${BOKKEN_DEVICE_IP} ~/remote.sh
result=$?
set -e
# copy artifacts from the remote machine
mkdir -p ${TEST_RESULT_DIR}
scp -i ${IDENTITY} -r bokken@${BOKKEN_DEVICE_IP}:~/test-results ${TEST_RESULT_DIR}
# return ssh commend results
if [ $result -ne 0 ]; then
exit $result
fi