From 48cc1ff4ad237950d8886bda83e36e8e7988bd20 Mon Sep 17 00:00:00 2001 From: Marcin Szydelski Date: Jan 30 2019 12:34:04 +0000 Subject: disable_retest=y now works as expected Code that checks if restest can be done is moved to the place where $testset is properly set. Before if you tried to run test different than 'default' (i.e. -t performance), with previously tested kernel, you couldn't. --- diff --git a/runtests.sh b/runtests.sh index 2488d47..d76e543 100755 --- a/runtests.sh +++ b/runtests.sh @@ -39,20 +39,6 @@ if [ ! -d "$logdir" ] ; then mkdir $logdir fi -if [ "$disable_retest" == "y" ]; then - # Check if wanted test has been executed with current kernel - # version. - for file in $(find $logdir -name \*.log.txt); do - version_tested=$(cat $file | sed -n 3p | cut -d ' ' -f 2) - test_executed=$(cat $file | sed -n 2p | cut -d ' ' -f 3) - - if [ "$version_tested" == "$kver" -a "$test_executed" == "$testset" ]; then - echo "The current kernel was already tested with this test, abort." - exit 0 - fi - done -fi - args=y while [ $args = y ] @@ -72,6 +58,21 @@ do esac done + +if [ "$disable_retest" == "y" ]; then + # Check if wanted test has been executed with current kernel + # version. + for file in $(find $logdir -name \*.log.txt); do + version_tested=$(cat $file | sed -n 3p | cut -d ' ' -f 2) + test_executed=$(cat $file | sed -n 2p | cut -d ' ' -f 3) + + if [ "$version_tested" == "$kver" -a "$test_executed" == "$testset" ]; then + echo "The current kernel was already tested with this test, abort." + exit 0 + fi + done +fi + case $testset in minimal) dirlist="minimal"