diff --git a/ci-scripts/tests/README.md b/ci-scripts/tests/README.md index 2fd3a45e70..1083f78e61 100644 --- a/ci-scripts/tests/README.md +++ b/ci-scripts/tests/README.md @@ -11,3 +11,12 @@ start with python tests/iperf-analysis.py -v It will indicate if all tests passed. + +# test-runner test + +This is not a true test, because the results need to be manually inspected. To +run this "test", run + + ./run.sh + +inside the `test-runner/` directory (important!). diff --git a/ci-scripts/tests/test-runner/run.sh b/ci-scripts/tests/test-runner/run.sh new file mode 100755 index 0000000000..40d0289453 --- /dev/null +++ b/ci-scripts/tests/test-runner/run.sh @@ -0,0 +1,49 @@ +#/bin/bash + +branch=$(git rev-parse --abbrev-ref HEAD) +commit=$(git rev-parse HEAD) +file=../../test_results.html +rm -f ${file} + +cd ../../ +python3 main.py \ + --mode=InitiateHtml \ + --ranRepository=https://gitlab.eurecom.fr/oai/openairinterface5g.git \ + --ranBranch=${branch} \ + --ranCommitID=${commit} \ + --ranAllowMerge=true \ + --ranTargetBranch=develop \ + --XMLTestFile=tests/test-runner/test.xml + +python3 main.py \ + --mode=TesteNB \ + --ranRepository=https://gitlab.eurecom.fr/oai/openairinterface5g.git \ + --ranBranch=${branch} \ + --ranCommitID=${commit} \ + --ranAllowMerge=true \ + --ranTargetBranch=develop \ + --eNBIPAddress=localhost \ + --eNBUserName=NONE \ + --eNBPassword=NONE \ + --eNBSourceCodePath=NONE \ + --UEIPAddress=localhost \ + --UEUserName=NONE \ + --UEPassword=NONE \ + --UESourceCodePath=NONE \ + --EPCIPAddress=localhost \ + --EPCType=OAI \ + --EPCUserName=NONE \ + --EPCPassword=NONE \ + --EPCSourceCodePath=NONE \ + --XMLTestFile=tests/test-runner/test.xml + +python3 main.py \ + --mode=FinalizeHtml \ + --finalStatus=true +cd - + +if [ -f ${file} ]; then + echo "results are in ${file}" +else + echo "ERROR: no results file created" +fi diff --git a/ci-scripts/tests/test-runner/test.xml b/ci-scripts/tests/test-runner/test.xml new file mode 100644 index 0000000000..e4b2f24d26 --- /dev/null +++ b/ci-scripts/tests/test-runner/test.xml @@ -0,0 +1,41 @@ + + + + test + Manual testing + wrench + 1 + + 000001 + + + + + Custom_Command + This should succeed + localhost + true + yes + +