diff options
-rwxr-xr-x | build-test-kernel | 16 | ||||
-rw-r--r-- | ci/_test-git-branch.sh | 2 |
2 files changed, 16 insertions, 2 deletions
diff --git a/build-test-kernel b/build-test-kernel index 7ea4823..0a5388e 100755 --- a/build-test-kernel +++ b/build-test-kernel @@ -19,6 +19,7 @@ ktest_kernel_source="." # dir of kernel source # set with: -k <path> # defaults: current directory ktest_njobs=$(nproc) +ktest_precise=false COVERAGE="" # doing code coverage? MAKEARGS=() @@ -56,11 +57,14 @@ fi CMD="$1" shift -while getopts "k:c:h${ktest_args}" arg; do +while getopts "k:Pc:h${ktest_args}" arg; do case $arg in k) ktest_kernel_source="$OPTARG" ;; + P) + ktest_precise=true + ;; c) if [[ ! -d $OPTARG ]]; then echo "$OPTARG must be a directory" @@ -173,6 +177,11 @@ build_kernel() { rm -rf "$ktest_kernel_binary" mkdir -p "$ktest_kernel_binary" + local kconfig="$ktest_kernel_build/.config" + + if $ktest_precise && [[ -f "$kconfig" ]]; then + mv "$kconfig" "$kconfig".bak + fi new_config @@ -188,6 +197,11 @@ build_kernel() [[ -n $opt ]] && kernel_opt check "$opt" done + # Preserve timestamp if config didn't change: + if $ktest_precise && [[ -f "$kconfig".bak ]] && diff -q "$kconfig" "$kconfig".bak; then + mv "$kconfig".bak "$kconfig" + fi + case $KERNEL_ARCH in mips) do_make -k vmlinuz diff --git a/ci/_test-git-branch.sh b/ci/_test-git-branch.sh index 273add4..8f4b8a6 100644 --- a/ci/_test-git-branch.sh +++ b/ci/_test-git-branch.sh @@ -115,7 +115,7 @@ while (( ${#SUBTESTS[@]} )); do $KTEST_DIR/lib/supervisor -T 1200 -f "$FULL_LOG" -S -F \ -b $TEST_NAME -o ktest-out/out \ - -- build-test-kernel run $TEST_PATH ${SUBTESTS[@]} > /dev/null & + -- build-test-kernel run -P $TEST_PATH ${SUBTESTS[@]} > /dev/null & wait SUBTESTS_REMAINING=() |