From a5dd5fd2fffc96ef8ed92ac4882d9db6826ba564 Mon Sep 17 00:00:00 2001 From: Michal Sojka Date: Thu, 10 Apr 2014 14:44:06 +0200 Subject: [PATCH] continuous: Fix configuration step for newer kernels It is not sufficient to always answer no. The "choice" question needs Enter or a number. We answer with Enter. --- continuous/steps/20-config | 2 +- continuous/steps/my-oldconfig.pl | 12 ++++++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100755 continuous/steps/my-oldconfig.pl diff --git a/continuous/steps/20-config b/continuous/steps/20-config index dfbaad2..a58c94f 100755 --- a/continuous/steps/20-config +++ b/continuous/steps/20-config @@ -62,4 +62,4 @@ conf NETFILTER y conf PACKET y # ugw mmap -timeout 2m yes n|chronic make oldconfig +chronic ../my-oldconfig.pl diff --git a/continuous/steps/my-oldconfig.pl b/continuous/steps/my-oldconfig.pl new file mode 100755 index 0000000..17080b4 --- /dev/null +++ b/continuous/steps/my-oldconfig.pl @@ -0,0 +1,12 @@ +#!/usr/bin/perl -w + +use Expect; +my $exp = Expect->spawn("make oldconfig") + or die "Cannot spawn make oldconfig: $!\n"; + +my $timeout = 1; +$exp->expect($timeout, + [ '^ *choice\[.*\]: ' => sub { $exp->send("\n"); exp_continue; } ], + [ '^([^ ]| *[^>0-9]).*\(NEW\) ' => sub { $exp->send("n\n"); exp_continue; } ], + [ "configuration written to .config" ], + ) || die "Timeout" -- 2.39.2