CI: Add XML for channel simulator testing
This commit is contained in:
+46
@@ -0,0 +1,46 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
function die() { echo $@; exit 1; }
|
||||||
|
[ $# -ge 1 ] || die "usage: $0 <directory> [ctest-options]"
|
||||||
|
|
||||||
|
IMAGE=ran-channelsim:ci-temp
|
||||||
|
CONTAINER=ran-channelsim
|
||||||
|
function cleanup-docker() {
|
||||||
|
docker stop ${CONTAINER}
|
||||||
|
docker rm ${CONTAINER}
|
||||||
|
docker rmi ${IMAGE}
|
||||||
|
docker volume prune --force
|
||||||
|
}
|
||||||
|
trap cleanup-docker EXIT
|
||||||
|
|
||||||
|
set -x
|
||||||
|
DIR=$1
|
||||||
|
RESULT_DIR=${DIR}/
|
||||||
|
shift
|
||||||
|
CTEST_OPT=$@
|
||||||
|
|
||||||
|
# build channel simulator
|
||||||
|
docker build --progress=plain --tag ${IMAGE} --file ${DIR}/ci-scripts/docker/Dockerfile.channelsim.ubuntu ${DIR} &>> ${RESULT_DIR}/channelsim_build_log.txt
|
||||||
|
if [ $? -ne 0 ]; then
|
||||||
|
echo "build of channel simulator failed"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
# get a JSON description of all tests to run
|
||||||
|
docker run -a STDOUT --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --rm --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --show-only=json-v1 &> ${RESULT_DIR}/desc-tests.json
|
||||||
|
JSON_RES=$?
|
||||||
|
|
||||||
|
# run the actual tests: we don't suppy --rm as we have to copy the files
|
||||||
|
# similar to unit tests, we can't mount the file where we write physims-5g-run.xml to
|
||||||
|
# as it would write a file as root, but this script is run as a normal user
|
||||||
|
docker run -a STDOUT --gpus all --workdir /oai-ran/build/ --env LD_LIBRARY_PATH=/oai-ran/build/ --name ${CONTAINER} ${IMAGE} ctest ${CTEST_OPT} --output-junit results-run.xml --test-output-size-passed 100000 --test-output-size-failed 100000 &>> ${RESULT_DIR}/channelsim_log.txt
|
||||||
|
RUN_RES=$?
|
||||||
|
docker cp ${CONTAINER}:/oai-ran/build/results-run.xml ${RESULT_DIR}/
|
||||||
|
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTestsFailed.log ${RESULT_DIR}/
|
||||||
|
docker cp ${CONTAINER}:/oai-ran/build/Testing/Temporary/LastTest.log ${RESULT_DIR}/
|
||||||
|
|
||||||
|
# if both were successful, return 0
|
||||||
|
# TODO not sure
|
||||||
|
#[[ $JSON_RES -eq 0 && $RUN_RES -eq 0 ]] && exit 0
|
||||||
|
|
||||||
|
exit 0
|
||||||
@@ -34,7 +34,7 @@
|
|||||||
<testCase>
|
<testCase>
|
||||||
<class>Build_Deploy_PhySim</class>
|
<class>Build_Deploy_PhySim</class>
|
||||||
<desc>Build and Deploy PhySim with timing check</desc>
|
<desc>Build and Deploy PhySim with timing check</desc>
|
||||||
<script>scripts/source-deploy-physims.sh</script>
|
<script>scripts/docker-build-and-deploy-physims.sh</script>
|
||||||
<node>localhost</node>
|
<node>localhost</node>
|
||||||
<ctest-opt>-R 5g -R "nr_dlsim|nr_ulsim|ldpctest" -E physim.5g.nr_dlsim.mcs.mimo.test9 -j1</ctest-opt>
|
<ctest-opt>-R 5g -R "nr_dlsim|nr_ulsim|ldpctest" -E physim.5g.nr_dlsim.mcs.mimo.test9 -j1</ctest-opt>
|
||||||
</testCase>
|
</testCase>
|
||||||
|
|||||||
@@ -0,0 +1,43 @@
|
|||||||
|
<!--
|
||||||
|
|
||||||
|
Licensed to the OpenAirInterface (OAI) Software Alliance under one or more
|
||||||
|
contributor license agreements. See the NOTICE file distributed with
|
||||||
|
this work for additional information regarding copyright ownership.
|
||||||
|
The OpenAirInterface Software Alliance licenses this file to You under
|
||||||
|
the OAI Public License, Version 1.1 (the "License"); you may not use this file
|
||||||
|
except in compliance with the License.
|
||||||
|
You may obtain a copy of the License at
|
||||||
|
|
||||||
|
http://www.openairinterface.org/?page_id=698
|
||||||
|
|
||||||
|
Unless required by applicable law or agreed to in writing, software
|
||||||
|
distributed under the License is distributed on an "AS IS" BASIS,
|
||||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||||
|
See the License for the specific language governing permissions and
|
||||||
|
limitations under the License.
|
||||||
|
|
||||||
|
For more information about the OpenAirInterface (OAI) Software Alliance:
|
||||||
|
contact@openairinterface.org
|
||||||
|
|
||||||
|
-->
|
||||||
|
<testCaseList>
|
||||||
|
<htmlTabRef>channelsim-tab</htmlTabRef>
|
||||||
|
<htmlTabName>ChannelSim</htmlTabName>
|
||||||
|
<htmlTabIcon>wrench</htmlTabIcon>
|
||||||
|
|
||||||
|
<testCase>
|
||||||
|
<class>Create_Workspace</class>
|
||||||
|
<desc>Create new Workspace</desc>
|
||||||
|
<node>localhost</node>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
<testCase>
|
||||||
|
<class>Build_Deploy_PhySim</class>
|
||||||
|
<desc>Build and Deploy Test Channel Simulation</desc>
|
||||||
|
<script>scripts/docker-build-and-deploy-chansim.sh</script>
|
||||||
|
<node>localhost</node>
|
||||||
|
<ctest-opt>-R cuda.5g.channelsim</ctest-opt>
|
||||||
|
</testCase>
|
||||||
|
|
||||||
|
</testCaseList>
|
||||||
|
|
||||||
Reference in New Issue
Block a user