ktest.pl (de65d816aa44f9ddd79861ae21d75010cc1fd003) | ktest.pl (319ab14f051aeb04d6da20d82b389ad875083041) |
---|---|
1#!/usr/bin/perl -w 2# 3# Copyright 2010 - Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. 4# Licensed under the terms of the GNU GPL License version 2 5# 6 7use strict; 8use IPC::Open2; --- 605 unchanged lines hidden (view full) --- 614 my ($lvalue, $rvalue, $override, $overrides, $name) = @_; 615 616 my $prvalue = process_variables($rvalue); 617 618 if ($buildonly && $lvalue =~ /^TEST_TYPE(\[.*\])?$/ && $prvalue ne "build") { 619 # Note if a test is something other than build, then we 620 # will need other manditory options. 621 if ($prvalue ne "install") { | 1#!/usr/bin/perl -w 2# 3# Copyright 2010 - Steven Rostedt <srostedt@redhat.com>, Red Hat Inc. 4# Licensed under the terms of the GNU GPL License version 2 5# 6 7use strict; 8use IPC::Open2; --- 605 unchanged lines hidden (view full) --- 614 my ($lvalue, $rvalue, $override, $overrides, $name) = @_; 615 616 my $prvalue = process_variables($rvalue); 617 618 if ($buildonly && $lvalue =~ /^TEST_TYPE(\[.*\])?$/ && $prvalue ne "build") { 619 # Note if a test is something other than build, then we 620 # will need other manditory options. 621 if ($prvalue ne "install") { |
622 # for bisect, we need to check BISECT_TYPE 623 if ($prvalue ne "bisect") { 624 $buildonly = 0; 625 } 626 } else { 627 # install still limits some manditory options. 628 $buildonly = 2; 629 } 630 } 631 632 if ($buildonly && $lvalue =~ /^BISECT_TYPE(\[.*\])?$/ && $prvalue ne "build") { 633 if ($prvalue ne "install") { |
|
622 $buildonly = 0; 623 } else { 624 # install still limits some manditory options. 625 $buildonly = 2; 626 } 627 } 628 629 if (defined($opt{$lvalue})) { --- 644 unchanged lines hidden (view full) --- 1274 $monitor_pid = open_console $monitor_fp; 1275 1276 return; 1277 1278 open(MONFD, "Stop perl from warning about single use of MONFD"); 1279} 1280 1281sub end_monitor { | 634 $buildonly = 0; 635 } else { 636 # install still limits some manditory options. 637 $buildonly = 2; 638 } 639 } 640 641 if (defined($opt{$lvalue})) { --- 644 unchanged lines hidden (view full) --- 1286 $monitor_pid = open_console $monitor_fp; 1287 1288 return; 1289 1290 open(MONFD, "Stop perl from warning about single use of MONFD"); 1291} 1292 1293sub end_monitor { |
1294 return if (!defined $console); |
|
1282 if (--$monitor_cnt) { 1283 return; 1284 } 1285 close_console($monitor_fp, $monitor_pid); 1286} 1287 1288sub wait_for_monitor { 1289 my ($time, $stop) = @_; --- 290 unchanged lines hidden (view full) --- 1580 my $ch; 1581 1582 if (!defined($time)) { 1583 $time = $timeout; 1584 } 1585 1586 $rin = ''; 1587 vec($rin, fileno($fp), 1) = 1; | 1295 if (--$monitor_cnt) { 1296 return; 1297 } 1298 close_console($monitor_fp, $monitor_pid); 1299} 1300 1301sub wait_for_monitor { 1302 my ($time, $stop) = @_; --- 290 unchanged lines hidden (view full) --- 1593 my $ch; 1594 1595 if (!defined($time)) { 1596 $time = $timeout; 1597 } 1598 1599 $rin = ''; 1600 vec($rin, fileno($fp), 1) = 1; |
1588 $ready = select($rin, undef, undef, $time); | 1601 ($ready, $time) = select($rin, undef, undef, $time); |
1589 1590 $line = ""; 1591 1592 # try to read one char at a time 1593 while (sysread $fp, $ch, 1) { 1594 $line .= $ch; 1595 last if ($ch eq "\n"); 1596 } --- 289 unchanged lines hidden (view full) --- 1886 $version = `$make kernelrelease | tail -1`; 1887 chomp($version); 1888 doprint "$version\n"; 1889 $have_version = 1; 1890} 1891 1892sub start_monitor_and_boot { 1893 # Make sure the stable kernel has finished booting | 1602 1603 $line = ""; 1604 1605 # try to read one char at a time 1606 while (sysread $fp, $ch, 1) { 1607 $line .= $ch; 1608 last if ($ch eq "\n"); 1609 } --- 289 unchanged lines hidden (view full) --- 1899 $version = `$make kernelrelease | tail -1`; 1900 chomp($version); 1901 doprint "$version\n"; 1902 $have_version = 1; 1903} 1904 1905sub start_monitor_and_boot { 1906 # Make sure the stable kernel has finished booting |
1894 start_monitor; 1895 wait_for_monitor 5; 1896 end_monitor; | |
1897 | 1907 |
1908 # Install bisects, don't need console 1909 if (defined $console) { 1910 start_monitor; 1911 wait_for_monitor 5; 1912 end_monitor; 1913 } 1914 |
|
1898 get_grub_index; 1899 get_version; 1900 install; 1901 | 1915 get_grub_index; 1916 get_version; 1917 install; 1918 |
1902 start_monitor; | 1919 start_monitor if (defined $console); |
1903 return monitor; 1904} 1905 1906sub check_buildlog { 1907 my ($patch) = @_; 1908 1909 my @files = `git show $patch | diffstat -l`; 1910 --- 2013 unchanged lines hidden --- | 1920 return monitor; 1921} 1922 1923sub check_buildlog { 1924 my ($patch) = @_; 1925 1926 my @files = `git show $patch | diffstat -l`; 1927 --- 2013 unchanged lines hidden --- |