diff options
| -rwxr-xr-x | tools/testing/ktest/ktest.pl | 36 |
1 files changed, 0 insertions, 36 deletions
diff --git a/tools/testing/ktest/ktest.pl b/tools/testing/ktest/ktest.pl index abd6f37b0561..4711f57e809a 100755 --- a/tools/testing/ktest/ktest.pl +++ b/tools/testing/ktest/ktest.pl | |||
| @@ -1916,42 +1916,6 @@ sub _get_grub_index { | |||
| 1916 | $last_machine = $machine; | 1916 | $last_machine = $machine; |
| 1917 | } | 1917 | } |
| 1918 | 1918 | ||
| 1919 | sub get_grub2_index { | ||
| 1920 | |||
| 1921 | return if (defined($grub_number) && defined($last_grub_menu) && | ||
| 1922 | $last_grub_menu eq $grub_menu && defined($last_machine) && | ||
| 1923 | $last_machine eq $machine); | ||
| 1924 | |||
| 1925 | doprint "Find grub2 menu ... "; | ||
| 1926 | $grub_number = -1; | ||
| 1927 | |||
| 1928 | my $ssh_grub = $ssh_exec; | ||
| 1929 | $ssh_grub =~ s,\$SSH_COMMAND,cat $grub_file,g; | ||
| 1930 | |||
| 1931 | open(IN, "$ssh_grub |") | ||
| 1932 | or dodie "unable to get $grub_file"; | ||
| 1933 | |||
| 1934 | my $found = 0; | ||
| 1935 | my $grub_menu_qt = quotemeta($grub_menu); | ||
| 1936 | |||
| 1937 | while (<IN>) { | ||
| 1938 | if (/^menuentry.*$grub_menu_qt/) { | ||
| 1939 | $grub_number++; | ||
| 1940 | $found = 1; | ||
| 1941 | last; | ||
| 1942 | } elsif (/^menuentry\s|^submenu\s/) { | ||
| 1943 | $grub_number++; | ||
| 1944 | } | ||
| 1945 | } | ||
| 1946 | close(IN); | ||
| 1947 | |||
| 1948 | dodie "Could not find '$grub_menu' in $grub_file on $machine" | ||
| 1949 | if (!$found); | ||
| 1950 | doprint "$grub_number\n"; | ||
| 1951 | $last_grub_menu = $grub_menu; | ||
| 1952 | $last_machine = $machine; | ||
| 1953 | } | ||
| 1954 | |||
| 1955 | sub get_grub_index { | 1919 | sub get_grub_index { |
| 1956 | 1920 | ||
| 1957 | my $command; | 1921 | my $command; |
