From: Jim Meyering Date: Fri, 20 Dec 1996 06:09:45 +0000 (+0000) Subject: New option: --list. Generate lists of files used/generated. X-Git-Tag: FILEUTILS-3_14a~57 X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=81d1fa5cb682d3f24fbe88e65b5985f136b7677b;p=thirdparty%2Fcoreutils.git New option: --list. Generate lists of files used/generated. --- diff --git a/tests/cut/mk-script.pl b/tests/cut/mk-script.pl index 93a7ae1b8e..5f9c9af6a6 100644 --- a/tests/cut/mk-script.pl +++ b/tests/cut/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } diff --git a/tests/head/mk-script.pl b/tests/head/mk-script.pl index 93a7ae1b8e..5f9c9af6a6 100644 --- a/tests/head/mk-script.pl +++ b/tests/head/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } diff --git a/tests/join/mk-script.pl b/tests/join/mk-script.pl index 93a7ae1b8e..5f9c9af6a6 100644 --- a/tests/join/mk-script.pl +++ b/tests/join/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; } diff --git a/tests/ls/mk-script.pl b/tests/ls/mk-script.pl index 93a7ae1b8e..5f9c9af6a6 100644 --- a/tests/ls/mk-script.pl +++ b/tests/ls/mk-script.pl @@ -117,13 +117,38 @@ sub spec_to_list ($$$) my $xx = $ARGV[0]; - if ($xx eq '--list-generated') + if ($xx eq '--list') { validate (); # FIXME !!!!!!!!!!!!!!!!!!!!!!!!!!!! - # Output two lists of files: + # Output three lists of files: + # EXPLICIT -- file names specified in Test.pm # MAINT_GEN -- maintainer-generated files # RUN_GEN -- files created when running the tests + my $test_vector; + my @exp; + my @maint; + my @run; + foreach $test_vector (@Test::t) + { + my ($test_name, $flags, $in_spec, $exp_spec, $e_ret_code) + = @{$test_vector}; + + push (@run, ("t$test_name.out", "t$test_name.err")); + + my $in = spec_to_list ($in_spec, $test_name, 'in'); + push (@exp, @{$in->{EXPLICIT}}); + push (@maint, @{$in->{MAINT_GEN}}); + + my $e = spec_to_list ($exp_spec, $test_name, 'exp'); + push (@exp, @{$e->{EXPLICIT}}); + push (@maint, @{$e->{MAINT_GEN}}); + } + + print 'explicit: ', join (' ', @exp), "\n"; + print 'maint-gen: ', join (' ', @maint), "\n"; + print 'run-gen: ', join (' ', @run), "\n"; + exit 0; }