badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 1 | #!/bin/bash |
| 2 | |
| 3 | # Copyright 2019-present Open Networking Foundation |
| 4 | # |
Ajay Lotan Thakur | 03189d2 | 2022-02-10 14:06:03 -0600 | [diff] [blame] | 5 | # SPDX-License-Identifier: Apache-2.0 |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 6 | |
| 7 | APPLICATION=$1 |
| 8 | |
| 9 | {{- if .Values.config.coreDump.enabled }} |
| 10 | cp /openmme/target/bin/$APPLICATION /tmp/coredump/ |
| 11 | {{- end }} |
| 12 | |
| 13 | # copy config files to openmme target directly |
| 14 | cp /opt/mme/config/shared/* /openmme/target/conf/ |
| 15 | |
| 16 | cd /openmme/target |
| 17 | export LD_LIBRARY_PATH=/usr/local/lib:./lib |
| 18 | |
| 19 | case $APPLICATION in |
| 20 | "mme-app") |
| 21 | echo "Starting mme-app" |
| 22 | echo "conf/mme.json" |
| 23 | cat conf/mme.json |
| 24 | ./bin/mme-app |
| 25 | ;; |
| 26 | "s1ap-app") |
| 27 | echo "Starting s1ap-app" |
| 28 | echo "conf/s1ap.json" |
badhri85 | 35ee61f | 2022-01-03 14:32:37 -0600 | [diff] [blame] | 29 | today=`date '+%Y_%m_%d__%H_%M_%S'`; |
| 30 | filename="/tmp/valgrind_output_s1ap_$today.txt" |
| 31 | echo $filename |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 32 | cat conf/s1ap.json |
badhri85 | 135b00c | 2021-12-14 17:46:24 -0700 | [diff] [blame] | 33 | {{- if .Values.config.valgrind.enabled }} |
badhri85 | 35ee61f | 2022-01-03 14:32:37 -0600 | [diff] [blame] | 34 | valgrind --log-file=$filename --tool=memcheck -v --leak-check=full --show-leak-kinds=all ./bin/s1ap-app |
badhri85 | 135b00c | 2021-12-14 17:46:24 -0700 | [diff] [blame] | 35 | {{- else }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 36 | ./bin/s1ap-app |
badhri85 | 135b00c | 2021-12-14 17:46:24 -0700 | [diff] [blame] | 37 | {{- end }} |
badhri85 | 4c028b3 | 2021-11-03 18:24:05 -0500 | [diff] [blame] | 38 | ;; |
| 39 | "s6a-app") |
| 40 | echo "Starting s6a-app" |
| 41 | echo "conf/s6a.json" |
| 42 | cat conf/s6a.json |
| 43 | echo "conf/s6a_fd.conf" |
| 44 | cat conf/s6a_fd.conf |
| 45 | ./bin/s6a-app |
| 46 | ;; |
| 47 | "s11-app") |
| 48 | echo "Starting s11-app" |
| 49 | echo "conf/s11.json" |
| 50 | cat conf/s11.json |
| 51 | ./bin/s11-app |
| 52 | ;; |
| 53 | *) |
| 54 | echo "invalid app $APPLICATION" |
| 55 | ;; |
| 56 | esac |