ci: rename sanitycheck -> twister
Change all CI scripts to use the new script name: twister. Signed-off-by: Anas Nashif <anas.nashif@intel.com>
This commit is contained in:
parent
5a4ab3388b
commit
a05d056943
12 changed files with 51 additions and 51 deletions
|
@ -25,7 +25,7 @@ steps:
|
|||
|
||||
- plugins:
|
||||
- junit-annotate#v1.7.0:
|
||||
artifacts: sanitycheck-*.xml
|
||||
artifacts: twister-*.xml
|
||||
|
||||
notify:
|
||||
- email: "builds+int+399+7809482394022958124@lists.zephyrproject.org"
|
||||
|
|
|
@ -25,4 +25,4 @@ steps:
|
|||
|
||||
- plugins:
|
||||
- junit-annotate#v1.7.0:
|
||||
artifacts: sanitycheck-*.xml
|
||||
artifacts: twister-*.xml
|
||||
|
|
|
@ -6,13 +6,13 @@ set -eE
|
|||
|
||||
function cleanup()
|
||||
{
|
||||
# Rename sanitycheck junit xml for use with junit-annotate-buildkite-plugin
|
||||
# create dummy file if sanitycheck did nothing
|
||||
if [ ! -f sanity-out/sanitycheck.xml ]; then
|
||||
touch sanity-out/sanitycheck.xml
|
||||
# Rename twister junit xml for use with junit-annotate-buildkite-plugin
|
||||
# create dummy file if twister did nothing
|
||||
if [ ! -f twister-out/twister.xml ]; then
|
||||
touch twister-out/twister.xml
|
||||
fi
|
||||
mv sanity-out/sanitycheck.xml sanitycheck-${BUILDKITE_JOB_ID}.xml
|
||||
buildkite-agent artifact upload sanitycheck-${BUILDKITE_JOB_ID}.xml
|
||||
mv twister-out/twister.xml twister-${BUILDKITE_JOB_ID}.xml
|
||||
buildkite-agent artifact upload twister-${BUILDKITE_JOB_ID}.xml
|
||||
|
||||
|
||||
# Upload test_file to get list of tests that are build/run
|
||||
|
@ -57,7 +57,7 @@ if [ -n "${DAILY_BUILD}" ]; then
|
|||
west update 1> west.update.log || west update 1> west.update-2.log
|
||||
west forall -c 'git reset --hard HEAD'
|
||||
source zephyr-env.sh
|
||||
./scripts/sanitycheck --subset ${JOB_NUM}/${BUILDKITE_PARALLEL_JOB_COUNT} ${SANITYCHECK_OPTIONS}
|
||||
./scripts/twister --subset ${JOB_NUM}/${BUILDKITE_PARALLEL_JOB_COUNT} ${SANITYCHECK_OPTIONS}
|
||||
else
|
||||
if [ -n "${BUILDKITE_PULL_REQUEST_BASE_BRANCH}" ]; then
|
||||
./scripts/ci/run_ci.sh -c -b ${BUILDKITE_PULL_REQUEST_BASE_BRANCH} -r origin \
|
||||
|
|
4
.github/labeler.yml
vendored
4
.github/labeler.yml
vendored
|
@ -125,8 +125,8 @@
|
|||
- "Kconfig"
|
||||
- "Kconfig.zephyr"
|
||||
"area: Sanitycheck":
|
||||
- "scripts/sanitycheck"
|
||||
- "scripts/sanity_chk/**/*"
|
||||
- "scripts/twister"
|
||||
- "scripts/pylib/twister/**/*"
|
||||
"area: Modules":
|
||||
- "west.yml"
|
||||
- "modules/**/*"
|
||||
|
|
14
.github/workflows/sanitycheck_tests.yml
vendored
14
.github/workflows/sanitycheck_tests.yml
vendored
|
@ -6,14 +6,14 @@ name: Zephyr Sanitycheck TestSuite
|
|||
on:
|
||||
push:
|
||||
paths:
|
||||
- 'scripts/sanity_chk/sanitylib.py'
|
||||
- 'scripts/sanitycheck'
|
||||
- 'scripts/tests/sanitycheck/**'
|
||||
- 'scripts/pylib/twister/**'
|
||||
- 'scripts/twister'
|
||||
- 'scripts/tests/twister/**'
|
||||
pull_request:
|
||||
paths:
|
||||
- 'scripts/sanity_chk/**'
|
||||
- 'scripts/sanitycheck'
|
||||
- 'scripts/tests/sanitycheck/**'
|
||||
- 'scripts/pylib/twister/**'
|
||||
- 'scripts/twister'
|
||||
- 'scripts/tests/twister/**'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
@ -46,4 +46,4 @@ jobs:
|
|||
ZEPHYR_TOOLCHAIN_VARIANT: zephyr
|
||||
run: |
|
||||
echo "Run Sanitycheck tests"
|
||||
PYTHONPATH=./scripts/tests pytest ./scripts/tests/sanitycheck
|
||||
PYTHONPATH=./scripts/tests pytest ./scripts/tests/twister
|
||||
|
|
|
@ -144,7 +144,7 @@ or::
|
|||
|
||||
$ twister --coverage -p native_posix -T tests/bluetooth
|
||||
|
||||
which will produce ``sanity-out/coverage/index.html`` with the report.
|
||||
which will produce ``twister-out/coverage/index.html`` with the report.
|
||||
|
||||
The process differs for unit tests, which are built with the host
|
||||
toolchain and require a different board::
|
||||
|
|
|
@ -576,7 +576,7 @@ class Codeowners(ComplianceTest):
|
|||
"""
|
||||
|
||||
# TODO: filter out files not in "git ls-files" (e.g.,
|
||||
# sanity-out) _if_ the overhead isn't too high for a clean tree.
|
||||
# twister-out) _if_ the overhead isn't too high for a clean tree.
|
||||
#
|
||||
# pathlib.match() doesn't support **, so it looks like we can't
|
||||
# recursively glob the output of ls-files directly, only real
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# A script to generate a list of boards that have changed or added and create an
|
||||
# arguments file for sanitycheck to allow running more tests for those boards.
|
||||
# arguments file for twister to allow running more tests for those boards.
|
||||
|
||||
import re, os
|
||||
import sh
|
||||
|
@ -43,7 +43,7 @@ def init_logs():
|
|||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Generate a sanitycheck argument for for boards "
|
||||
description="Generate a twister argument for for boards "
|
||||
" that have changed")
|
||||
parser.add_argument('-c', '--commits', default=None,
|
||||
help="Commit range in the form: a..b")
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
# A script to generate a list of tests that have changed or added and create an
|
||||
# arguments file for sanitycheck to allow running those tests with --all
|
||||
# arguments file for twister to allow running those tests with --all
|
||||
|
||||
import os
|
||||
import sh
|
||||
|
@ -41,7 +41,7 @@ def init_logs():
|
|||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Generate a sanitycheck argument for for tests "
|
||||
description="Generate a twister argument for for tests "
|
||||
" that have changed")
|
||||
parser.add_argument('-c', '--commits', default=None,
|
||||
help="Commit range in the form: a..b")
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
set -xe
|
||||
|
||||
sanitycheck_options=" --inline-logs -N -v --integration"
|
||||
twister_options=" --inline-logs -N -v --integration"
|
||||
export BSIM_OUT_PATH="${BSIM_OUT_PATH:-/opt/bsim/}"
|
||||
if [ ! -d "${BSIM_OUT_PATH}" ]; then
|
||||
unset BSIM_OUT_PATH
|
||||
|
@ -46,9 +46,9 @@ function handle_coverage() {
|
|||
# Capture data
|
||||
echo "Running lcov --capture ..."
|
||||
lcov --capture \
|
||||
--directory sanity-out/native_posix/ \
|
||||
--directory sanity-out/nrf52_bsim/ \
|
||||
--directory sanity-out/unit_testing/ \
|
||||
--directory twister-out/native_posix/ \
|
||||
--directory twister-out/nrf52_bsim/ \
|
||||
--directory twister-out/unit_testing/ \
|
||||
--directory bsim_bt_out/ \
|
||||
--output-file lcov.pre.info -q --rc lcov_branch_coverage=1
|
||||
|
||||
|
@ -64,7 +64,7 @@ function handle_coverage() {
|
|||
|
||||
# Cleanup
|
||||
rm lcov.pre.info
|
||||
rm -rf sanity-out out-2nd-pass
|
||||
rm -rf twister-out out-2nd-pass
|
||||
|
||||
# Upload to codecov.io
|
||||
echo "Upload coverage reports to codecov.io"
|
||||
|
@ -72,7 +72,7 @@ function handle_coverage() {
|
|||
rm -f lcov.info
|
||||
fi
|
||||
|
||||
rm -rf sanity-out out-2nd-pass
|
||||
rm -rf twister-out out-2nd-pass
|
||||
|
||||
}
|
||||
|
||||
|
@ -94,14 +94,14 @@ function on_complete() {
|
|||
mkdir -p shippable/testresults
|
||||
mkdir -p shippable/codecoverage
|
||||
|
||||
if [ -e ./sanity-out/sanitycheck.xml ]; then
|
||||
echo "Copy ./sanity-out/sanitycheck.xml"
|
||||
cp ./sanity-out/sanitycheck.xml shippable/testresults/
|
||||
if [ -e ./twister-out/twister.xml ]; then
|
||||
echo "Copy ./twister-out/twister.xml"
|
||||
cp ./twister-out/twister.xml shippable/testresults/
|
||||
fi
|
||||
|
||||
if [ -e ./module_tests/sanitycheck.xml ]; then
|
||||
echo "Copy ./module_tests/sanitycheck.xml"
|
||||
cp ./module_tests/sanitycheck.xml \
|
||||
if [ -e ./module_tests/twister.xml ]; then
|
||||
echo "Copy ./module_tests/twister.xml"
|
||||
cp ./module_tests/twister.xml \
|
||||
shippable/testresults/module_tests.xml
|
||||
fi
|
||||
|
||||
|
@ -114,7 +114,7 @@ function on_complete() {
|
|||
echo "Skip handling coverage data..."
|
||||
#handle_coverage
|
||||
else
|
||||
rm -rf sanity-out out-2nd-pass
|
||||
rm -rf twister-out out-2nd-pass
|
||||
fi
|
||||
}
|
||||
|
||||
|
@ -126,15 +126,15 @@ function run_bsim_bt_tests() {
|
|||
}
|
||||
|
||||
function get_tests_to_run() {
|
||||
./scripts/zephyr_module.py --sanitycheck-out module_tests.args
|
||||
./scripts/zephyr_module.py --twister-out module_tests.args
|
||||
./scripts/ci/get_modified_tests.py --commits ${commit_range} > modified_tests.args
|
||||
./scripts/ci/get_modified_boards.py --commits ${commit_range} > modified_boards.args
|
||||
|
||||
if [ -s modified_boards.args ]; then
|
||||
${sanitycheck} ${sanitycheck_options} +modified_boards.args --save-tests test_file_1.txt || exit 1
|
||||
${twister} ${twister_options} +modified_boards.args --save-tests test_file_1.txt || exit 1
|
||||
fi
|
||||
if [ -s modified_tests.args ]; then
|
||||
${sanitycheck} ${sanitycheck_options} +modified_tests.args --save-tests test_file_2.txt || exit 1
|
||||
${twister} ${twister_options} +modified_tests.args --save-tests test_file_2.txt || exit 1
|
||||
fi
|
||||
rm -f modified_tests.args modified_boards.args
|
||||
}
|
||||
|
@ -217,7 +217,7 @@ if [ -n "$main_ci" ]; then
|
|||
commit_range=$range
|
||||
fi
|
||||
source zephyr-env.sh
|
||||
sanitycheck="${ZEPHYR_BASE}/scripts/sanitycheck"
|
||||
twister="${ZEPHYR_BASE}/scripts/twister"
|
||||
|
||||
# Possibly the only record of what exact version is being tested:
|
||||
short_git_log='git log -n 5 --oneline --decorate --abbrev=12 '
|
||||
|
@ -258,7 +258,7 @@ if [ -n "$main_ci" ]; then
|
|||
|
||||
if [ "$SC" == "full" ]; then
|
||||
# Save list of tests to be run
|
||||
${sanitycheck} ${sanitycheck_options} --save-tests test_file_3.txt || exit 1
|
||||
${twister} ${twister_options} --save-tests test_file_3.txt || exit 1
|
||||
else
|
||||
echo "test,arch,platform,status,extra_args,handler,handler_time,ram_size,rom_size" > test_file_3.txt
|
||||
fi
|
||||
|
@ -269,16 +269,16 @@ if [ -n "$main_ci" ]; then
|
|||
tail -n +2 test_file_1.txt > test_file_1_in.txt
|
||||
cat test_file_3.txt test_file_2_in.txt test_file_1_in.txt > test_file.txt
|
||||
|
||||
echo "+++ run sanitycheck"
|
||||
echo "+++ run twister"
|
||||
|
||||
# Run a subset of tests based on matrix size
|
||||
${sanitycheck} ${sanitycheck_options} --load-tests test_file.txt \
|
||||
${twister} ${twister_options} --load-tests test_file.txt \
|
||||
--subset ${matrix}/${matrix_builds} --retry-failed 3
|
||||
|
||||
# Run module tests on matrix #1
|
||||
if [ "$matrix" = "1" -a "$SC" == "full" ]; then
|
||||
if [ -s module_tests.args ]; then
|
||||
${sanitycheck} ${sanitycheck_options} \
|
||||
${twister} ${twister_options} \
|
||||
+module_tests.args --outdir module_tests
|
||||
fi
|
||||
fi
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#
|
||||
# The patterns listed in this file will be compared with the list of files
|
||||
# changed in a patch series (Pull Request) and if all files in the pull request
|
||||
# are matched, then sanitycheck will not do a full run and optionally will only
|
||||
# are matched, then twister will not do a full run and optionally will only
|
||||
# run on changed tests or boards.
|
||||
#
|
||||
.gitlint
|
||||
|
@ -28,8 +28,8 @@ doc/*
|
|||
*.rst
|
||||
*.md
|
||||
# if we change this file or associated script, it should not trigger a full
|
||||
# sanitycheck.
|
||||
scripts/ci/sanitycheck_ignore.txt
|
||||
# twister.
|
||||
scripts/ci/twister_ignore.txt
|
||||
scripts/ci/what_changed.py
|
||||
scripts/ci/version_mgr.py
|
||||
scripts/requirements*
|
|
@ -1,7 +1,7 @@
|
|||
#!/usr/bin/env python3
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# Copyright (c) 2020 Intel Corporation
|
||||
# Check if full sanitycheck is needed.
|
||||
# Check if full twister is needed.
|
||||
|
||||
import os
|
||||
import sh
|
||||
|
@ -20,7 +20,7 @@ sh_special_args = {
|
|||
|
||||
def parse_args():
|
||||
parser = argparse.ArgumentParser(
|
||||
description="Check if change requires full sanitycheck")
|
||||
description="Check if change requires full twister")
|
||||
parser.add_argument('-c', '--commits', default=None,
|
||||
help="Commit range in the form: a..b")
|
||||
return parser.parse_args()
|
||||
|
@ -36,7 +36,7 @@ def main():
|
|||
files = set()
|
||||
files.update(commit.split("\n"))
|
||||
|
||||
with open("scripts/ci/sanitycheck_ignore.txt", "r") as sc_ignore:
|
||||
with open("scripts/ci/twister_ignore.txt", "r") as sc_ignore:
|
||||
ignores = sc_ignore.read().splitlines()
|
||||
ignores = filter(lambda x: not x.startswith("#"), ignores)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue