Author: chromatic
Date: Wed May 23 15:25:21 2007
New Revision: 18635

Modified:
   trunk/src/extend.c
   trunk/t/harness
   trunk/t/src/compiler.t
   trunk/tools/build/nativecall.pl

Log:
[t] Run t/distro/file_metadata.t only in development checkouts (Mark Glines, RT 
#43041).

Modified: trunk/src/extend.c
==============================================================================
--- trunk/src/extend.c  (original)
+++ trunk/src/extend.c  Wed May 23 15:25:21 2007
@@ -770,8 +770,6 @@
     PARROT_CALLIN_START(interp);
 
     va_start(ap, signature);
-    CONTEXT(interp->ctx)->constants =
-        PMC_sub(sub)->seg->const_table->constants;
     result = Parrot_runops_fromc_arglist(interp, sub, signature, ap);
     va_end(ap);
 

Modified: trunk/t/harness
==============================================================================
--- trunk/t/harness     (original)
+++ trunk/t/harness     Wed May 23 15:25:21 2007
@@ -161,10 +161,13 @@
 # append the distribution checking tests to the default tests
 my @distro_tests = map { "t/distro/$_" } qw(
     manifest.t
-    file_metadata.t
 );
 push @default_tests, @distro_tests;
 
+# append the file_metadata.t only if we're running in a non-release checkout
+push @default_tests, 't/distro/file_metadata.t'
+    if -e "$Bin/../DEVELOPING";
+
 # collect the coding standard tests (that we want to run) together
 # append them to the list of default tests *only* if this is not a release
 my @coding_std_tests = map { "t/codingstd/$_" } qw(

Modified: trunk/t/src/compiler.t
==============================================================================
--- trunk/t/src/compiler.t      (original)
+++ trunk/t/src/compiler.t      Wed May 23 15:25:21 2007
@@ -27,11 +27,16 @@
 
 =cut
 
+SKIP:
+{
+#    skip( "compreg disabled", 1 );
+
 c_output_is( <<'CODE', <<'OUTPUT', "compreg/compile" );
 
 #include <stdio.h>
 #include "parrot/parrot.h"
 #include "parrot/embed.h"
+#include "parrot/extend.h"
 
 extern void imcc_init(Parrot_Interp interp);
 
@@ -49,7 +54,7 @@
     compreg = VTABLE_get_pmc_keyed_int(interp,
                                        interp->iglobals,
                                        IGLOBALS_COMPREG_HASH);
-    pir = const_string(interp, "PIR");
+    pir  = const_string(interp, "PIR");
     comp = VTABLE_get_pmc_keyed_str(interp, compreg, pir);
     if (PMC_IS_NULL(comp) || !VTABLE_defined(interp, comp)) {
         PIO_eprintf(interp, "Pir compiler not loaded");
@@ -58,7 +63,7 @@
     /*
      * compile source
      */
-    prog = imcc_compile_pir(interp, c_src);
+    prog = Parrot_call_sub(interp, comp, "PS", string_from_cstring(interp, 
c_src, 0) );
 
     if (PMC_IS_NULL(prog) || !VTABLE_defined(interp, prog)) {
         PIO_eprintf(interp, "Pir compiler returned no prog");
@@ -107,6 +112,8 @@
 CODE
 ok
 OUTPUT
+}
+
 c_output_is( <<'CODE', <<'OUTPUT', "Parror Compile API Single call" );
 
 #include <stdio.h>
@@ -124,40 +131,28 @@
     PMC *comp, *prog, *compreg, *entry;
     opcode_t *dest;
     STRING *error;
-    /*
-     * get PIR compiler  - TODO API
-     */
-    compreg = VTABLE_get_pmc_keyed_int(interp,
-                                       interp->iglobals,
-                                       IGLOBALS_COMPREG_HASH);
-    pir = const_string(interp, "PIR");
-    comp = VTABLE_get_pmc_keyed_str(interp, compreg, pir);
-    if (PMC_IS_NULL(comp) || !VTABLE_defined(interp, comp)) {
-        PIO_eprintf(interp, "Pir compiler not loaded");
-        exit(1);
-    }
 
     /*
      * compile source
      */
+    pir  = const_string(interp, "PIR");
     prog = Parrot_compile_string(interp, pir, c_src, &error);
 
-    if (PMC_IS_NULL(prog) || !VTABLE_defined(interp, prog)) {
-        PIO_eprintf(interp, "Pir compiler returned no prog");
+    if (PMC_IS_NULL(prog)) {
+        PIO_eprintf(interp, "PIR compiler returned no Sub PMC");
         exit(1);
     }
+
     /* keep eval PMC alive */
     dod_register_pmc(interp, prog);
+
     /* locate function to run */
     smain = const_string(interp, "main");
     entry = Parrot_find_global_cur(interp, smain);
+
     /* location of the entry */
-    interp->current_cont = new_ret_continuation_pmc(interp, NULL);
-    dest = VTABLE_invoke(interp, entry, NULL);
-    /* where to start */
-    interp->resume_offset = dest -interp->code->base.data;
-    /* and go */
-    Parrot_runcode(interp, argc, argv);
+    Parrot_call_sub( interp, entry, "vv" );
+
     return NULL;
 }
 
@@ -189,6 +184,7 @@
 CODE
 ok
 OUTPUT
+
 c_output_is( <<'CODE', <<'OUTPUT', "Parror Compile API Multiple Calls" );
 
 #include <stdio.h>
@@ -280,6 +276,7 @@
 ok
 hola
 OUTPUT
+
 c_output_is( <<'CODE', <<'OUTPUT', "Parror Compile API Multiple 1st bad PIR" );
 
 #include <stdio.h>

Modified: trunk/tools/build/nativecall.pl
==============================================================================
--- trunk/tools/build/nativecall.pl     (original)
+++ trunk/tools/build/nativecall.pl     Wed May 23 15:25:21 2007
@@ -1,5 +1,5 @@
 #! perl
-# Copyright (C) 2001-2005, The Perl Foundation.
+# Copyright (C) 2001-2007, The Perl Foundation.
 # $Id$
 
 =head1 NAME
@@ -275,7 +275,7 @@
  */
 
 /* nci.c
- *  Copyright (C) 2001-2006, The Perl Foundation.
+ *  Copyright (C) 2001-2007, The Perl Foundation.
  *  SVN Info
  *     \$Id\$
  *  Overview:

Reply via email to