summaryrefslogtreecommitdiff
path: root/.gitlab-ci.yml
diff options
context:
space:
mode:
authorAdriano Cordova <adrianox@gmail.com>2025-05-16 04:52:55 -0400
committerTom Rini <trini@konsulko.com>2025-05-30 11:19:43 -0600
commit3e58991339843faa87c28c7d4caf4318ea2046c4 (patch)
tree2fc3ae315cdb0d0f4b3403e58894f12fa0a64901 /.gitlab-ci.yml
parent9cd88f0eab903997754b2f9e021156b6084052ee (diff)
CI testing: add http server to CI tests
Add an http server to CI tests so that HTTP booting and loading can be tested. Signed-off-by: Adriano Cordova <adriano.cordova@canonical.com> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
Diffstat (limited to '.gitlab-ci.yml')
-rw-r--r--.gitlab-ci.yml13
1 files changed, 12 insertions, 1 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
index 7aadd5d8b73..9f94f4a518f 100644
--- a/.gitlab-ci.yml
+++ b/.gitlab-ci.yml
@@ -106,10 +106,21 @@ stages:
# "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
- export PATH=/opt/qemu/bin:/tmp/uboot-test-hooks/bin:${PATH};
export PYTHONPATH=/tmp/uboot-test-hooks/py/travis-ci;
+ python3 -m http.server 80 --directory "${UBOOT_TRAVIS_BUILD_DIR}" > /dev/null 2>&1 &
+ HTTP_PID=$!;
+ sleep 1;
+ if ps -p ${HTTP_PID} > /dev/null; then
+ export HTTP_PID;
+ else
+ unset HTTP_PID;
+ fi;
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_EXTRA}
${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
--build-dir "$UBOOT_TRAVIS_BUILD_DIR"
- --junitxml=/tmp/${TEST_PY_BD}/results.xml
+ --junitxml=/tmp/${TEST_PY_BD}/results.xml;
+ if [[ -n "${HTTP_PID}" ]]; then
+ kill ${HTTP_PID};
+ fi
artifacts:
when: always
paths: