[svn:parrot] r43583 - branches/one_make/t/tools/pmc2cutils

jkeenan at svn.parrot.org jkeenan at svn.parrot.org
Sun Jan 24 20:14:23 UTC 2010


Author: jkeenan
Date: Sun Jan 24 20:14:20 2010
New Revision: 43583
URL: https://trac.parrot.org/parrot/changeset/43583

Log:
Update README to explain purpose of tests.  Fix one TODO-ed test.

Modified:
   branches/one_make/t/tools/pmc2cutils/04-dump_pmc.t
   branches/one_make/t/tools/pmc2cutils/README

Modified: branches/one_make/t/tools/pmc2cutils/04-dump_pmc.t
==============================================================================
--- branches/one_make/t/tools/pmc2cutils/04-dump_pmc.t	Sun Jan 24 17:28:58 2010	(r43582)
+++ branches/one_make/t/tools/pmc2cutils/04-dump_pmc.t	Sun Jan 24 20:14:20 2010	(r43583)
@@ -19,7 +19,7 @@
     }
     unshift @INC, qq{$topdir/lib};
 }
-use Test::More tests => 106;
+use Test::More tests => 108;
 use File::Basename;
 use File::Copy;
 use FindBin;
@@ -311,12 +311,12 @@
         my $rv = copy( $pmcfile, qq{$temppmcdir/$basename} );
         $copycount++ if $rv;
     }
-    is( $copycount, $pmcfilecount, "all src/pmc/*.pmc files copied to tempdir" );
+    is( $copycount, $pmcfilecount,
+        "all src/pmc/*.pmc files copied to tempdir" );
     my @include = ( $tdir, $temppmcdir, @include_orig );
 
     @args = (
         qq{$temppmcdir/default.pmc},
-
         #    qq{$temppmcdir/scalar.pmc},
         qq{$temppmcdir/integer.pmc},
     );
@@ -332,15 +332,10 @@
     $dump_file = $self->dump_vtable("$main::topdir/src/vtable.tbl");
     ok( -e $dump_file, "dump_vtable created vtable.dump" );
 
-    TODO: {
-        local $TODO = q{needs reworking to work after 'make'};
-        eval { $self->dump_pmc(); };
-        like(
-            $@,
-            qr/^cannot find file 'scalar\.dump' in path/,
-            "ERROR WAS '$@', path is $temppmcdir"
-        );
-    }
+     $self->dump_pmc();
+    ok( -f qq{$temppmcdir/default.dump}, "default.dump created as expected" );
+    ok( ! -f qq{$temppmcdir/scalar.dump},  "scalar.dump not created as expected" );
+    ok( -f qq{$temppmcdir/integer.dump}, "integer.dump created as expected" );
 
     ok( chdir $cwd, "changed back to original directory" );
 }
@@ -590,10 +585,6 @@
 =head1 SEE ALSO
 
 Parrot::Pmc2c, F<pmc2c.pl>.
-        "array.dump correctly overwritten");
-
-    ok(chdir $cwd, "changed back to original directory");
-}
 
 pass("Completed all tests in $0");
 

Modified: branches/one_make/t/tools/pmc2cutils/README
==============================================================================
--- branches/one_make/t/tools/pmc2cutils/README	Sun Jan 24 17:28:58 2010	(r43582)
+++ branches/one_make/t/tools/pmc2cutils/README	Sun Jan 24 20:14:20 2010	(r43583)
@@ -4,18 +4,17 @@
 
 This directory contains test code for Parrot::Pmc2c::Pmc2cMain, a Perl5
 module whose publicly callable methods and other subroutines supply
-functionality for Parrot build tool 'pmc2c.pl'.
-
-Since 'pmc2c.pl' is invoked many times during 'make', tests of its
-functionality can give meaningful results only if you run them
-when your file system beneath the top-level Parrot directory is in
-a 'pre-make' state, i.e., you have run 'perl Configure.pl' but
-have *not* yet run 'make'.  These tests should pass if run at
-that point in the build process, but some will necessarily fail
-if 'make' has already been executed.  Hence, they should not be
-included in the set of tests run by 'make test'.
-
-In short, these are tests of Parrot::Pmc2c::Pmc2cMain but are *not*
-tests of Parrot itself.
+functionality to Parrot build tool 'tools/build/pmc2c.pl'.
 
+'pmc2c.pl' is invoked many times during 'make', so it is important that
+Parrot developers be able to understand and, if necessary, refactor its
+component parts.  The tests in this directory serve to illustrate those
+parts.  They should be run by any developer refactoring 'pmc2c.pl' or
+the many modules underlying that program.
 
+However, since the processes they test precede the creation of the
+'parrot' executable, failures of these tests do not necessarily indicate
+problems with that executable.  For that reason, these tests are not
+included in the 'make test' or 'make fulltest' targets.  They can,
+however, be run as part of 'make buildtools_tests' and developers are
+encouraged to do so.


More information about the parrot-commits mailing list