Atlas - reltest

Home / ext / kconfiglib / tests Lines: 5 | Size: 1503 bytes [Download] [Show on GitHub] [Search similar files] [Raw] [Raw (proxy)]
[FILE BEGIN]
1#!/usr/bin/env bash 2 3# Runs the test suite and all examples scripts with Python 2 and Python 3, 4# bailing immediately if anything fails. For the examples that aren't tested in 5# the test suite, we just confirm that they at least run. 6# 7# Should be run from the kernel root with $ Kconfiglib/tests/reltest 8 9test_script() { 10 echo -e "\n================= $1 with $py =================\n" 11 if (($# == 1)); then 12 make scriptconfig PYTHONCMD=$py SCRIPT=$1 13 else 14 make scriptconfig PYTHONCMD=$py SCRIPT=$1 SCRIPT_ARG="$2" 15 fi 16 17 if (($?)); then 18 echo "$1 failed to run with $py" 19 exit 1 20 fi 21} 22 23for py in python2 python3; do 24 echo -e "\n================= Test suite with $py =================\n" 25 26 if ! $py Kconfiglib/testsuite.py; then 27 echo "test suite failed for $py" 28 exit 1 29 fi 30 31 # Check that the example scripts that aren't tested by the test suite run 32 # at least 33 34 test_script Kconfiglib/examples/defconfig_oldconfig.py 35 test_script Kconfiglib/examples/eval_expr.py MODULES 36 test_script Kconfiglib/examples/find_symbol.py X86 37 test_script Kconfiglib/examples/help_grep.py general 38 test_script Kconfiglib/examples/print_sym_info.py MODULES 39 test_script Kconfiglib/examples/print_tree.py 40 41 $py Kconfiglib/examples/menuconfig_example.py Kconfiglib/examples/Kmenuconfig <<END 42BOOL 43n 44END 45 if (($?)); then 46 echo "menuconfig_example.py failed with $py" 47 exit 1 48 fi 49done 50 51echo "everything okay" 52
[FILE END]
(C) 2025 0x4248 (C) 2025 4248 Media and 4248 Systems, All part of 0x4248 See LICENCE files for more information. Not all files are by 0x4248 always check Licencing.