@@ -91,6 +91,20 @@ logError(){
9191
9292# Unity Version -----------------------------------------------------------------
9393
94+ DIR=" ./artifacts"
95+ if [[ -d " $DIR " ]]; then
96+ echo " Artifacts directory exists"
97+ else
98+ echo " Artifacts directory does not exist"
99+ fi
100+
101+ FILE=" artifacts/TestResults.js"
102+ if [[ -f " $FILE " ]]; then
103+ echo " TestResults File exists and is a regular file"
104+ else
105+ echo " TestResults File missing"
106+ fi
107+
94108unity_version=sed -n ' s/.*"editorVersion": *"\([^" (]*\).*/\1/p' artifacts/TestResults.js
95109
96110# ensure arguments were passed and the ports are defined
@@ -100,69 +114,69 @@ elif [[ "$echo_port" == "$service_port" ]]; then
100114 logMessage " Found Unity version: $unity_version " ;
101115fi
102116
103- # Protocol Buffer Compiler ------------------------------------------------------
117+ # # Protocol Buffer Compiler ------------------------------------------------------
104118
105- # Apply any updates
106- logMessage " Updating modules..."
107- sudo apt-get update
119+ # # Apply any updates
120+ # logMessage "Updating modules..."
121+ # sudo apt-get update
108122
109- # Install Protocol Buffer Compiler (using apt-get)
110- logMessage " Installing protocol buffer compiler as SUDO..."
111- try sudo apt-get install -y protobuf-compiler
123+ # # Install Protocol Buffer Compiler (using apt-get)
124+ # logMessage "Installing protocol buffer compiler as SUDO..."
125+ # try sudo apt-get install -y protobuf-compiler
112126
113- # If the previous command failed, try without sudo
114- if $ThrewError ; then
115- logMessage " Installing protocol buffer compiler as shell assigned account..."
116- apt-get install -y protobuf-compiler
117- else
118- logMessage " Protocol buffer compiler was installed as sudo!"
119- fi
127+ # # If the previous command failed, try without sudo
128+ # if $ThrewError; then
129+ # logMessage "Installing protocol buffer compiler as shell assigned account..."
130+ # apt-get install -y protobuf-compiler
131+ # else
132+ # logMessage "Protocol buffer compiler was installed as sudo!"
133+ # fi
120134
121- # Add the PROTOC environment variable that points to the Protocol Buffer Compiler binary
122- export PROTOC=" /usr/bin/protoc"
135+ # # Add the PROTOC environment variable that points to the Protocol Buffer Compiler binary
136+ # export PROTOC="/usr/bin/protoc"
123137
124- # Validate the PROTOC env var by getting the protoc version
125- try $PROTOC --version
138+ # # Validate the PROTOC env var by getting the protoc version
139+ # try $PROTOC --version
126140
127- if $ThrewError ; then
128- logError " Failed to properly run protoc!"
129- exit -1
130- else
131- logMessage " Protocol Buffer Compiler Installed & ENV variables verified!\n PROTOC path is: $PROTOC "
132- fi
141+ # if $ThrewError; then
142+ # logError "Failed to properly run protoc!"
143+ # exit -1
144+ # else
145+ # logMessage "Protocol Buffer Compiler Installed & ENV variables verified!\n PROTOC path is: $PROTOC"
146+ # fi
133147
134- # clone the cmb service repo
135- git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git
148+ # # clone the cmb service repo
149+ # git clone https://github.com/Unity-Technologies/mps-common-multiplayer-backend.git
136150
137- # navigate to the cmb service directory
138- cd ./mps-common-multiplayer-backend/runtime
151+ # # navigate to the cmb service directory
152+ # cd ./mps-common-multiplayer-backend/runtime
139153
140- # Install rust
141- curl --proto ' =https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
154+ # # Install rust
155+ # curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y
142156
143- # Add the cargo bin directory to the PATH
144- export PATH=" $HOME /.cargo/bin:$PATH "
157+ # # Add the cargo bin directory to the PATH
158+ # export PATH="$HOME/.cargo/bin:$PATH"
145159
146- # Echo server -------------------------------------------------------------------
160+ # # Echo server -------------------------------------------------------------------
147161
148- # Build the echo server
149- logMessage " Beginning echo server build..."
150- cargo build --example ngo_echo_server
162+ # # Build the echo server
163+ # logMessage "Beginning echo server build..."
164+ # cargo build --example ngo_echo_server
151165
152- # Run the echo server in the background
153- logMessage " Running echo server tests..."
154- cargo run --example ngo_echo_server -- --port $echo_port &
166+ # # Run the echo server in the background
167+ # logMessage "Running echo server tests..."
168+ # cargo run --example ngo_echo_server -- --port $echo_port &
155169
156- # CMB Service -------------------------------------------------------------------
170+ # # CMB Service -------------------------------------------------------------------
157171
158- # Build a release version of the standalone cmb service
159- logMessage " Beginning service release build..."
160- cargo build --release --locked
172+ # # Build a release version of the standalone cmb service
173+ # logMessage "Beginning service release build..."
174+ # cargo build --release --locked
161175
162- # Run the standalone service on an infinite loop in the background.
163- # The infinite loop is required as the service will exit each time all connected clients disconnect.
164- # This means the service will exit after each test. The infinite loop will immediately restart the service each time it exits.
165- logMessage " Running service integration tests..."
166- while : ; do
167- ./target/release/comb-server -l error --metrics-port 5000 standalone --port $service_port -t 60m --unity-version $unity_version ;
168- done & # <- use & to run the entire loop in the background
176+ # # Run the standalone service on an infinite loop in the background.
177+ # # The infinite loop is required as the service will exit each time all connected clients disconnect.
178+ # # This means the service will exit after each test. The infinite loop will immediately restart the service each time it exits.
179+ # logMessage "Running service integration tests..."
180+ # while :; do
181+ # ./target/release/comb-server -l error --metrics-port 5000 standalone --port $service_port -t 60m --unity-version $unity_version;
182+ # done & # <- use & to run the entire loop in the background
0 commit comments