Hotwheels-Cluster 1.2
Creation of Cluster APP for SEA:ME project.
 
Loading...
Searching...
No Matches
test-entry-point.sh
Go to the documentation of this file.
1#!/bin/bash
2# -*- tab-width: 4; encoding: utf-8 -*-
3#
4
23
24
25APP="./app/build/x86_Qt5_15_2-Debug/HotWheels-app"
26
27
28OUTPUT=$($APP --test 2>&1)
29
30
31EXPECTED_OUTPUT="[Main] HotWheels Cluster starting...
32[Main] Test mode activated. Exiting..."
33
34# Trim whitespace for both outputs
35OUTPUT=$(echo "$OUTPUT" | xargs)
36EXPECTED_OUTPUT=$(echo "$EXPECTED_OUTPUT" | xargs)
37
38if [ "$OUTPUT" == "$EXPECTED_OUTPUT" ]; then
39 echo "Test passed!"
40 exit 0
41else
42 echo "Test failed!"
43 echo "Expected:"
44 echo "[$EXPECTED_OUTPUT]"
45 echo "Got:"
46 echo "[$OUTPUT]"
47 exit 1
48fi