Skip to content

Commit 5e9152d

Browse files
committed
added run.sh
1 parent 80d8677 commit 5e9152d

File tree

5 files changed

+28
-14
lines changed

5 files changed

+28
-14
lines changed

.cicd-config

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,3 +20,11 @@ RESULT_PREFIX=result
2020
COV_MIN_LIMIT=50.0%
2121
COV_SOURCE_DIR=test/unit
2222
COV_RESULT_DIR=$RESULT_PREFIX-coverage
23+
24+
25+
USAGE_TEXT="This is standard usage text. Please specify the required one."
26+
PrintUsageAndExit()
27+
{
28+
echo $USAGE_TEXT
29+
exit 1
30+
}

build.sh

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
. .cicd-config
22

3+
USAGE_TEXT="Usage ./build.sh <dev/rel/test>"
34
if [[ $# -eq 0 ]]; then
4-
echo "Usage ./build.sh <dev/rel/test>"
5-
exit 1
5+
PrintUsageAndExit
66
elif [[ $1 == "dev" ]]; then
77
BUILD_DIR=$BUILD_DIR_DEV
88
CMAKE_PARAMS="-DASAN=ON"
@@ -14,8 +14,7 @@ elif [[ $1 == "test" ]]; then
1414
BUILD_DIR=$BUILD_DIR_DEV
1515
TARGET=$TARGET_TEST
1616
else
17-
echo "Usage ./build.sh <dev/rel/test>"
18-
exit 1
17+
PrintUsageAndExit
1918
fi
2019

2120
cmake -H. -B$BUILD_DIR $CMAKE_PARAMS

run-asan.sh

Lines changed: 0 additions & 3 deletions
This file was deleted.

run-tests.sh

Lines changed: 0 additions & 7 deletions
This file was deleted.

run.sh

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
. .cicd-config
2+
3+
USAGE_TEXT="Usage ./run.sh <dev/rel/test>"
4+
if [[ $# -eq 0 ]]; then
5+
PrintUsageAndExit
6+
elif [[ $1 == "dev" ]]; then
7+
$BUILD_DIR_DEV/src/$TARGET_SRC
8+
elif [[ $1 == "rel" ]]; then
9+
$BUILD_DIR_REL/src/$TARGET_SRC
10+
elif [[ $1 == "test" ]]; then
11+
echo "_________________________________________ Unit Tests _________________________________________"
12+
$BUILD_DIR_DEV/test/unit/unit-tests
13+
echo "_________________________________________ Component Tests _________________________________________"
14+
$BUILD_DIR_DEV/test/component/component-tests
15+
else
16+
PrintUsageAndExit
17+
fi

0 commit comments

Comments
 (0)