Compare commits
1 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7d5b0f8671 |
@@ -6,10 +6,6 @@ include:
|
|||||||
variables:
|
variables:
|
||||||
DEFAULT_TAG: ""
|
DEFAULT_TAG: ""
|
||||||
MIRROR_DOCKER: docker.io
|
MIRROR_DOCKER: docker.io
|
||||||
TEST_SUITES: "1"
|
|
||||||
TEST_PY: "1"
|
|
||||||
TEST_SPEC: ""
|
|
||||||
WORLD_BUILD: "1"
|
|
||||||
LAB_ONLY: ""
|
LAB_ONLY: ""
|
||||||
SJG_LAB: ""
|
SJG_LAB: ""
|
||||||
PLATFORM: linux/amd64,linux/arm64
|
PLATFORM: linux/amd64,linux/arm64
|
||||||
@@ -27,10 +23,10 @@ default:
|
|||||||
|
|
||||||
# We run some tests in different order, to catch some failures quicker.
|
# We run some tests in different order, to catch some failures quicker.
|
||||||
stages:
|
stages:
|
||||||
- test_suites
|
- testsuites
|
||||||
- test.py
|
- test.py
|
||||||
- sjg-lab
|
- sjg-lab
|
||||||
- world_build
|
- world build
|
||||||
- version_bump
|
- version_bump
|
||||||
- release
|
- release
|
||||||
|
|
||||||
@@ -38,15 +34,10 @@ stages:
|
|||||||
stage: test.py
|
stage: test.py
|
||||||
retry: 2 # QEMU may be too slow, etc.
|
retry: 2 # QEMU may be too slow, etc.
|
||||||
rules:
|
rules:
|
||||||
|
- if: $LAB_ONLY != "1"
|
||||||
|
when: always
|
||||||
- if: $LAB_ONLY == "1"
|
- if: $LAB_ONLY == "1"
|
||||||
when: never
|
when: never
|
||||||
- if: $TEST_PY == "1"
|
|
||||||
when: always
|
|
||||||
- if: $TEST_PY == $CI_JOB_NAME
|
|
||||||
when: always
|
|
||||||
- if: $TEST_PY == $TEST_PY_BD
|
|
||||||
when: always
|
|
||||||
- when: never
|
|
||||||
before_script:
|
before_script:
|
||||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||||
# qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
|
# qemu_arm64_lwip_defconfig is the same as qemu_arm64 but with NET_LWIP enabled.
|
||||||
@@ -115,17 +106,11 @@ stages:
|
|||||||
export bl1=/tmp/bl1.bin;
|
export bl1=/tmp/bl1.bin;
|
||||||
export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:${PATH};
|
export PATH=/opt/Base_RevC_AEMvA_pkg/models/Linux64_GCC-9.3:${PATH};
|
||||||
fi
|
fi
|
||||||
- if [[ -n "${TEST_SPEC}" ]]; then
|
|
||||||
SPEC="${TEST_SPEC}";
|
|
||||||
echo 'Using provided test spec ${TEST_SPEC}"';
|
|
||||||
else
|
|
||||||
SPEC="${TEST_PY_TEST_SPEC}";
|
|
||||||
fi
|
|
||||||
# "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
|
# "${var:+"-k $var"}" expands to "" if $var is empty, "-k $var" if not
|
||||||
- export PATH=/opt/qemu/bin:test/hooks/bin:${PATH};
|
- export PATH=/opt/qemu/bin:test/hooks/bin:${PATH};
|
||||||
export PYTHONPATH=test/hooks/py/travis-ci;
|
export PYTHONPATH=test/hooks/py/travis-ci;
|
||||||
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_EXTRA}
|
./test/py/test.py -ra --bd ${TEST_PY_BD} ${TEST_PY_ID} ${TEST_PY_EXTRA}
|
||||||
${SPEC:+"-k ${SPEC}"}
|
${TEST_PY_TEST_SPEC:+"-k ${TEST_PY_TEST_SPEC}"}
|
||||||
--build-dir "$UBOOT_TRAVIS_BUILD_DIR"
|
--build-dir "$UBOOT_TRAVIS_BUILD_DIR"
|
||||||
--junitxml=/tmp/${TEST_PY_BD}/results.xml
|
--junitxml=/tmp/${TEST_PY_BD}/results.xml
|
||||||
artifacts:
|
artifacts:
|
||||||
@@ -139,13 +124,12 @@ stages:
|
|||||||
expire_in: 1 week
|
expire_in: 1 week
|
||||||
|
|
||||||
.world_build:
|
.world_build:
|
||||||
stage: world_build
|
stage: world build
|
||||||
rules:
|
rules:
|
||||||
|
- if: $LAB_ONLY != "1"
|
||||||
|
when: always
|
||||||
- if: $LAB_ONLY == "1"
|
- if: $LAB_ONLY == "1"
|
||||||
when: never
|
when: never
|
||||||
- if: $WORLD_BUILD == "1"
|
|
||||||
when: always
|
|
||||||
- when: never
|
|
||||||
|
|
||||||
build all 32bit ARM platforms:
|
build all 32bit ARM platforms:
|
||||||
extends: .world_build
|
extends: .world_build
|
||||||
@@ -222,17 +206,16 @@ build all other platforms:
|
|||||||
exit $ret;
|
exit $ret;
|
||||||
fi;
|
fi;
|
||||||
|
|
||||||
.test_suites:
|
.testsuites:
|
||||||
stage: test_suites
|
stage: testsuites
|
||||||
rules:
|
rules:
|
||||||
|
- if: $LAB_ONLY != "1"
|
||||||
|
when: always
|
||||||
- if: $LAB_ONLY == "1"
|
- if: $LAB_ONLY == "1"
|
||||||
when: never
|
when: never
|
||||||
- if: $TEST_SUITES == "1"
|
|
||||||
when: always
|
|
||||||
- when: never
|
|
||||||
|
|
||||||
check for new CONFIG symbols outside Kconfig:
|
check for new CONFIG symbols outside Kconfig:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
script:
|
script:
|
||||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
- git config --global --add safe.directory "${CI_PROJECT_DIR}"
|
||||||
# If grep succeeds and finds a match the test fails as we should
|
# If grep succeeds and finds a match the test fails as we should
|
||||||
@@ -245,7 +228,7 @@ check for new CONFIG symbols outside Kconfig:
|
|||||||
|
|
||||||
# build documentation
|
# build documentation
|
||||||
docs:
|
docs:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
script:
|
script:
|
||||||
- python3 -m venv /tmp/venvhtml
|
- python3 -m venv /tmp/venvhtml
|
||||||
- . /tmp/venvhtml/bin/activate
|
- . /tmp/venvhtml/bin/activate
|
||||||
@@ -255,13 +238,13 @@ docs:
|
|||||||
|
|
||||||
# ensure all configs have MAINTAINERS entries
|
# ensure all configs have MAINTAINERS entries
|
||||||
Check for configs without MAINTAINERS entry:
|
Check for configs without MAINTAINERS entry:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
script:
|
script:
|
||||||
- ./tools/buildman/buildman --maintainer-check
|
- ./tools/buildman/buildman --maintainer-check
|
||||||
|
|
||||||
# Ensure host tools build
|
# Ensure host tools build
|
||||||
Build tools-only and envtools:
|
Build tools-only and envtools:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
tags:
|
tags:
|
||||||
- single
|
- single
|
||||||
script:
|
script:
|
||||||
@@ -269,8 +252,8 @@ Build tools-only and envtools:
|
|||||||
make mrproper;
|
make mrproper;
|
||||||
make tools-only_config envtools -j$(nproc)
|
make tools-only_config envtools -j$(nproc)
|
||||||
|
|
||||||
Run binman, buildman, dtoc, Kconfig and patman test suites:
|
Run binman, buildman, dtoc, Kconfig and patman testsuites:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
script:
|
script:
|
||||||
- git config --global user.name "GitLab CI Runner";
|
- git config --global user.name "GitLab CI Runner";
|
||||||
git config --global user.email trini@konsulko.com;
|
git config --global user.email trini@konsulko.com;
|
||||||
@@ -299,7 +282,7 @@ Run binman, buildman, dtoc, Kconfig and patman test suites:
|
|||||||
|
|
||||||
# Check for any pylint regressions
|
# Check for any pylint regressions
|
||||||
Run pylint:
|
Run pylint:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
tags:
|
tags:
|
||||||
- single
|
- single
|
||||||
script:
|
script:
|
||||||
@@ -323,7 +306,7 @@ Run pylint:
|
|||||||
|
|
||||||
# Check for pre-schema driver model tags
|
# Check for pre-schema driver model tags
|
||||||
Check for pre-schema tags:
|
Check for pre-schema tags:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
script:
|
script:
|
||||||
- git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
- git config --global --add safe.directory "${CI_PROJECT_DIR}";
|
||||||
# If grep succeeds and finds a match the test fails as we should
|
# If grep succeeds and finds a match the test fails as we should
|
||||||
@@ -332,7 +315,7 @@ Check for pre-schema tags:
|
|||||||
|
|
||||||
# Check we can package the Python tools
|
# Check we can package the Python tools
|
||||||
Check packing of Python tools:
|
Check packing of Python tools:
|
||||||
extends: .test_suites
|
extends: .testsuites
|
||||||
script:
|
script:
|
||||||
- make pip
|
- make pip
|
||||||
|
|
||||||
@@ -649,6 +632,11 @@ coreboot test.py:
|
|||||||
# Environment:
|
# Environment:
|
||||||
# SRC - source tree
|
# SRC - source tree
|
||||||
# OUT - output directory for builds
|
# OUT - output directory for builds
|
||||||
|
- if [[ -n ${SJG_LAB} ]]; then
|
||||||
|
if [[ "${SJG_LAB}" != "${ROLE}" && "${SJG_LAB}" != "1" ]]; then
|
||||||
|
exit 0;
|
||||||
|
fi;
|
||||||
|
fi
|
||||||
- export SRC="$(pwd)"
|
- export SRC="$(pwd)"
|
||||||
- export OUT="${SRC}/build/${ROLE}"
|
- export OUT="${SRC}/build/${ROLE}"
|
||||||
- export OUT_EXTRA="${SRC}/build/${ROLE}_extra"
|
- export OUT_EXTRA="${SRC}/build/${ROLE}_extra"
|
||||||
|
|||||||
@@ -95,34 +95,6 @@ testing cycle to edit these pipelines in separate local commits to pair them
|
|||||||
down to just the jobs you're interested in. These changes must be removed
|
down to just the jobs you're interested in. These changes must be removed
|
||||||
prior to submission.
|
prior to submission.
|
||||||
|
|
||||||
Available variables are:
|
|
||||||
|
|
||||||
TEST_SUITES
|
|
||||||
Set to 0 to disable the test_suites stage::
|
|
||||||
|
|
||||||
git push ci -o ci.variable=TEST_SUITES=0
|
|
||||||
|
|
||||||
TEST_PY
|
|
||||||
Set to 0 to disable the test.py stage, or set to the job name to run just
|
|
||||||
that job, or set to the board name to run all tests for that board:
|
|
||||||
|
|
||||||
For example::
|
|
||||||
|
|
||||||
git push ci -o ci.variable=TEST_PY=0
|
|
||||||
git push ci -o ci.variable=TEST_PY=sandbox
|
|
||||||
git push ci -o ci.variable=TEST_PY='sandbox with clang test.py'
|
|
||||||
|
|
||||||
WORLD_BUILD
|
|
||||||
Set to 0 to disable the world_build stage::
|
|
||||||
|
|
||||||
git push ci -o ci.variable=WORLD_BUILD=0
|
|
||||||
|
|
||||||
TEST_SPEC
|
|
||||||
Set to the test spec to use when running a test.py tests. This overrides
|
|
||||||
the spec provided by the job. For example::
|
|
||||||
|
|
||||||
git push ci -o ci.variable=TEST_SPEC=bootstd
|
|
||||||
|
|
||||||
Using the lab
|
Using the lab
|
||||||
-------------
|
-------------
|
||||||
|
|
||||||
@@ -141,9 +113,7 @@ To request that the lab runs::
|
|||||||
|
|
||||||
git push ci -o ci.variable=SJG_LAB=1 <branch>
|
git push ci -o ci.variable=SJG_LAB=1 <branch>
|
||||||
|
|
||||||
To request that *only* the lab runs, you can set TEST_PY=0 and TEST_SUITES=0
|
To request that *only* the lab runs::
|
||||||
and WORD_BUILD=0 as above. But as a shortcut you can use the LAB_ONLY
|
|
||||||
variables::
|
|
||||||
|
|
||||||
git push ci -o ci.variable=SJG_LAB=1 ci.variable=LAB_ONLY=1 <branch>
|
git push ci -o ci.variable=SJG_LAB=1 ci.variable=LAB_ONLY=1 <branch>
|
||||||
|
|
||||||
|
|||||||
@@ -63,8 +63,7 @@ class FsHelper:
|
|||||||
|
|
||||||
# Use a default filename; the caller can adjust it
|
# Use a default filename; the caller can adjust it
|
||||||
leaf = f'{prefix}.{fs_type}.img'
|
leaf = f'{prefix}.{fs_type}.img'
|
||||||
self.fs_img = os.path.join(
|
self.fs_img = os.path.join(config.persistent_data_dir, leaf)
|
||||||
config.persistent_data_dir if config else '', leaf)
|
|
||||||
|
|
||||||
# Some distributions do not add /sbin to the default PATH, where mkfs
|
# Some distributions do not add /sbin to the default PATH, where mkfs
|
||||||
# lives
|
# lives
|
||||||
|
|||||||
Reference in New Issue
Block a user