Skip to content

Commit 2d999a5

Browse files
authored
Add network test executor to Gitlab FV job (#1027)
Add nw test report to reporting job. Update some variables in script. Relates-To: OLPEDGE-2243 Signed-off-by: Yaroslav Stefinko <ext-yaroslav.stefinko@here.com>
1 parent 7236f34 commit 2d999a5

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-2
lines changed

.gitlab-ci.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ build_test_linux_fv:
5858
script:
5959
- $CI_PROJECT_DIR/scripts/linux/fv/gitlab_build_fv.sh
6060
- $CI_PROJECT_DIR/scripts/linux/fv/gitlab_test_fv.sh
61+
- $CI_PROJECT_DIR/scripts/linux/fv/gitlab-olp-cpp-sdk-functional-network-test.sh
6162
only:
6263
refs:
6364
- branches
@@ -146,13 +147,16 @@ translate_report_fv:
146147
- python -m junit2htmlreport --report-matrix reports/unit-index.html reports/olp-dataservice-write-test-report.xml reports/olp-dataservice-read-test-report.xml reports/olp-core-test-report.xml reports/olp-authentication-test-report.xml
147148
- python -m junit2htmlreport --report-matrix reports/integration-index.html reports/olp-integration*.xml
148149
- python -m junit2htmlreport --report-matrix reports/index.html reports/*.xml
150+
- python -m junit2htmlreport --report-matrix reports/fun-network-index.html reports/olp-functional-network-test-report.xml
151+
- sed -i -e 's/Reports\ Matrix/Functional\ Network\ Test\ Report/g' reports/fun-network-index.html
149152
- sed -i -e 's/Reports\ Matrix/Unit\ Test\ Report/g' reports/unit-index.html
150153
- sed -i -e 's/Reports\ Matrix/Integration\ Test\ Report/g' reports/integration-index.html
151154
- sed -i -e 's/Reports\ Matrix/Functional\ Test\ Report/g' reports/functional-index.html
152155
- sed -i -e 's/Reports\ Matrix/Full\ Test\ Report/g' reports/index.html
153156
- cat reports/unit-index.html >> reports/index.html
154157
- cat reports/integration-index.html >> reports/index.html
155158
- cat reports/functional-index.html >> reports/index.html
159+
- cat reports/fun-network-index.html >> reports/index.html
156160
- mkdir -p .public
157161
- cp reports/*ndex.html .public/
158162
artifacts:

scripts/linux/fv/gitlab-olp-cpp-sdk-functional-network-test.sh

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,11 @@
2020
# For core dump backtrace
2121
ulimit -c unlimited
2222

23+
# Set workspace location
24+
if [[ ${CI_PROJECT_DIR} == "" ]]; then
25+
export CI_PROJECT_DIR=`pwd`
26+
fi
27+
2328
echo ">>> Starting Mock Server... >>>"
2429
pushd tests/utils/mock-server
2530
npm install
@@ -46,11 +51,14 @@ echo "mock-server-cert.pem" >> /etc/ca-certificates.conf
4651
update-ca-certificates
4752

4853
echo ">>> Start network tests ... >>>"
49-
$REPO_HOME/build/tests/functional/network/olp-cpp-sdk-functional-network-tests \
50-
--gtest_output="xml:$REPO_HOME/reports/olp-functional-network-test-report.xml"
54+
$CI_PROJECT_DIR/build/tests/functional/network/olp-cpp-sdk-functional-network-tests \
55+
--gtest_output="xml:$CI_PROJECT_DIR/reports/olp-functional-network-test-report.xml"
56+
result=$?
5157
echo ">>> Finished network tests >>>"
5258

5359
# Terminate the mock server
5460
kill -TERM $SERVER_PID
5561

5662
wait
63+
64+
exit ${result}

0 commit comments

Comments
 (0)