Skip to content
Snippets Groups Projects
Commit 4add883c authored by Lluis Gifre Renom's avatar Lluis Gifre Renom
Browse files

Merge branch 'feat/pathcomp-component' of...

Merge branch 'feat/pathcomp-component' of https://gitlab.com/teraflow-h2020/controller into feat/ecoc22-dc-interconnect-disjoint
parents c0dd8eaa acc7ce27
No related branches found
No related tags found
2 merge requests!54Release 2.0.0,!4Compute component:
......@@ -84,15 +84,12 @@ unit test pathcomp-backend:
script:
- docker pull "$CI_REGISTRY_IMAGE/${IMAGE_NAME}-backend:$IMAGE_TAG"
#- docker run --name ${IMAGE_NAME}-backend -d -p 8081:8081 -v "$PWD/src/${IMAGE_NAME}/backend/tests:/opt/results" --network=teraflowbridge ${IMAGE_NAME}-backend:${IMAGE_TAG}-builder
- docker run --name ${IMAGE_NAME}-backend -d -p 8081:8081 --network=teraflowbridge ${IMAGE_NAME}-backend:${IMAGE_TAG}
- docker run --name ${IMAGE_NAME}-backend -d -p 8081:8081 --network=teraflowbridge ${IMAGE_NAME}-backend:${IMAGE_TAG}-builder
- sleep 5
- docker ps -a
- docker logs ${IMAGE_NAME}-backend
- sleep 5
- docker exec -i ${IMAGE_NAME}-backend bash -c "curl -0 -v -X POST -H 'Expect:' -H 'Content-Type:\ application/json' http://127.0.0.1:8081/pathComp/api/v1/compRoute -d @/var/teraflow/tests/pc-req.json"
- sleep 5
- docker exec -i ${IMAGE_NAME}-backend bash -c "killall -USR1 pathComp-cvr"
- sleep 5
- docker kill --signal=SIGUSR1 pathcomp-backend
- docker exec -i ${IMAGE_NAME}-backend bash -c "gcovr"
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
after_script:
......@@ -142,11 +139,8 @@ unit test pathcomp-frontend:
- docker ps -a
- docker logs ${IMAGE_NAME}-frontend
- docker logs ${IMAGE_NAME}-backend
- sleep 5
- docker exec -i ${IMAGE_NAME}-frontend bash -c "coverage run -m pytest --log-level=INFO --verbose $IMAGE_NAME/frontend/tests/test_unitary.py --junitxml=/opt/results/${IMAGE_NAME}-frontend_report.xml"
- sleep 5
- docker exec -i ${IMAGE_NAME}-frontend bash -c "coverage report --include='${IMAGE_NAME}/*' --show-missing"
- sleep 5
coverage: '/TOTAL\s+\d+\s+\d+\s+(\d+%)/'
after_script:
- docker ps -a
......
......@@ -20,6 +20,7 @@ ARG DEBIAN_FRONTEND=noninteractive
# Install build software
RUN apt-get update -y && apt-get install build-essential curl gcovr libglib2.0-dev -y
RUN apt-get install valgrind -y
# mkdir
RUN mkdir -p /var/teraflow
......@@ -38,11 +39,17 @@ RUN mv pathComp /var/teraflow/bin
# Build code coverage version
RUN make clean
RUN make coverage
#RUN make debug
EXPOSE 8081
# builder defines coverage version of pathcomp by default
# coverage entrypoint:
ENTRYPOINT [ "./pathComp-cvr", "config/pathcomp.conf", "pathcomp.log" ]
# debug entrypoint:
#ENTRYPOINT [ "./pathComp-dbg", "config/pathcomp.conf", "pathcomp.log" ]
# debug entrypoint with memory tracking:
#ENTRYPOINT [ "valgrind", "--leak-check=full", "--show-leak-kinds=all", "--track-origins=yes", "--show-error-list=yes", "./pathComp-dbg", "config/pathcomp.conf", "pathcomp.log" ]
# Stage 2
......@@ -61,5 +68,7 @@ WORKDIR /var/teraflow
# We make four distinct layers so if there are application changes the library layers can be re-used
COPY --from=builder /var/teraflow/bin/pathComp .
COPY --from=builder /var/teraflow/config/pathcomp.conf ./config
COPY --from=builder /var/teraflow/tests/. ./tests
# release entrypoint:
ENTRYPOINT [ "./pathComp", "config/pathcomp.conf", "pathcomp.log" ]
////////////////////////////////////////////////////////////////////////////////////////
/**
* # Copyright 2022 Centre Tecnològic de Telecomunicacions de Catalunya (CTTC/CERCA) www.cttc.es
* # Copyright 2022 Centre Tecnolgic de Telecomunicacions de Catalunya (CTTC/CERCA) www.cttc.es
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
......@@ -14,7 +14,7 @@
* See the License for the specific language governing permissions and
* limitations under the License.
* Author: CTTC/CERCA PONS RU Ricardo Martínez (ricardo.martinez@cttc.es)
* Author: CTTC/CERCA PONS RU Ricardo Martnez (ricardo.martinez@cttc.es)
*/
/////////////////////////////////////////////////////////////////////////////////////////
......@@ -110,8 +110,8 @@ struct map_nodes_t {
gint numMapNodes;
};
#define MAX_NUM_VERTICES 100
#define MAX_NUM_EDGES 100
#define MAX_NUM_VERTICES 10 // 100 # LGR: reduced from 100 to 10 to divide by 10 the memory used
#define MAX_NUM_EDGES 10 // 100 # LGR: reduced from 100 to 10 to divide by 10 the memory used
// Structures for the graph composition
struct targetNodes_t {
// remote / targeted node
......@@ -144,7 +144,7 @@ struct context_t {
////////////////////////////////////////////////////
// Structure for the Set of Contexts
///////////////////////////////////////////////////
#define MAX_NUMBER_CONTEXT 100
#define MAX_NUMBER_CONTEXT 5 // 100 # LGR: reduced from 100 to 5 to divide by 20 the memory used
struct contextSet_t {
struct context_t contextList[MAX_NUMBER_CONTEXT];
gint num_context_set;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment