cvsuser     03/03/10 00:58:20

  Modified:    .        MANIFEST nci_test.c
               t/native_pbc number_1.pbc number_2.pbc
               t/pmc    nci.t
  Added:       tools/dev mk_native_pbc
  Log:
  tests update; mk_native_pbc
  
  Revision  Changes    Path
  1.323     +1 -0      parrot/MANIFEST
  
  Index: MANIFEST
  ===================================================================
  RCS file: /cvs/public/parrot/MANIFEST,v
  retrieving revision 1.322
  retrieving revision 1.323
  diff -u -w -r1.322 -r1.323
  --- MANIFEST  5 Mar 2003 16:08:48 -0000       1.322
  +++ MANIFEST  10 Mar 2003 08:58:08 -0000      1.323
  @@ -1787,6 +1787,7 @@
   tools/dev/genrpt.pl
   tools/dev/lib_deps.pl
   tools/dev/manicheck.pl
  +tools/dev/mk_native_pbc
   tools/dev/parrot_coverage.pl
   tools/dev/rebuild_miniparrot.pl
   tools/dev/run_indent.pl
  
  
  
  1.2       +2 -2      parrot/nci_test.c
  
  Index: nci_test.c
  ===================================================================
  RCS file: /cvs/public/parrot/nci_test.c,v
  retrieving revision 1.1
  retrieving revision 1.2
  diff -u -w -r1.1 -r1.2
  --- nci_test.c        3 Dec 2002 10:42:05 -0000       1.1
  +++ nci_test.c        10 Mar 2003 08:58:08 -0000      1.2
  @@ -26,12 +26,12 @@
   
   /* test calls this with a string */
   int nci_ip(void *p) {
  -     printf("%c%c\n", (*(char**) p)[1], (*(char **) p)[0]);
  +     fprintf(stderr, "%c%c\n", (*(char**) p)[1], (*(char **) p)[0]);
        return 2;
   }
   
   int nci_it(void *p) {
  -     printf("%c%c\n", ((char*) p)[1], ((char *) p)[0]);
  +     fprintf(stderr, "%c%c\n", ((char*) p)[1], ((char *) p)[0]);
        return 2;
   }
   
  
  
  
  1.4       +5 -5      parrot/t/native_pbc/number_1.pbc
  
        <<Binary file>>
  
  
  1.4       +5 -5      parrot/t/native_pbc/number_2.pbc
  
        <<Binary file>>
  
  
  1.7       +24 -22    parrot/t/pmc/nci.t
  
  Index: nci.t
  ===================================================================
  RCS file: /cvs/public/parrot/t/pmc/nci.t,v
  retrieving revision 1.6
  retrieving revision 1.7
  diff -u -w -r1.6 -r1.7
  --- nci.t     30 Dec 2002 10:46:56 -0000      1.6
  +++ nci.t     10 Mar 2003 08:58:15 -0000      1.7
  @@ -178,10 +178,12 @@
   OUTPUT
   
   output_is(<<'CODE', <<'OUTPUT', "nci_i_p");
  +  # here the nci_i_p prints (now to) stderr. To get things printed
  +  # in order, this test prints to stderr too
     loadlib P1, "libnci.so"
  -  print "loaded\n"
  +  print 2, "loaded\n"
     dlfunc P0, P1, "nci_ip", "ip"
  -  print "dlfunced\n"
  +  print 2, "dlfunced\n"
     set I0, 1  # prototype used - unchecked
     set I1, 0  # items on stack - unchecked
     new P5, .PerlString
  @@ -193,13 +195,13 @@
     ne I2, 0, nok_2
     ne I3, 0, nok_2
     ne I4, 0, nok_2
  -  print "ok 2\n"
  +  print 2, "ok 2\n"
     end
  -nok_1: print "nok 1\n"
  -  print I5
  -  print "\n"
  +nok_1: print 2, "nok 1\n"
  +  print 2, I5
  +  print 2, "\n"
     end
  -nok_2: print "nok 2\n"
  +nok_2: print 2, "nok 2\n"
     end
   CODE
   loaded
  @@ -210,16 +212,16 @@
   
   output_is(<<'CODE', <<'OUTPUT', "nci_p_p");
     loadlib P1, "libnci.so"
  -  print "loaded\n"
  +  print 2, "loaded\n"
     dlfunc P0, P1, "nci_pp", "pp"
  -  print "dlfunced\n"
  +  print 2, "dlfunced\n"
     set I0, 1  # prototype used - unchecked
     set I1, 0  # items on stack - unchecked
     new P5, .PerlString
     set P5, "ko\n"     # big HACK, broken with GC_IS_MALLOC
     invoke     # cant test ret value yet, print it
     dlfunc P0, P1, "nci_ip", "ip"
  -  print "dlfunced\n"
  +  print 2, "dlfunced\n"
     invoke
     ne I5, 2, nok_1
     ne I0, 0, nok_2    # test return value convention
  @@ -227,13 +229,13 @@
     ne I2, 0, nok_2
     ne I3, 0, nok_2
     ne I4, 0, nok_2
  -  print "ok 2\n"
  +  print 2, "ok 2\n"
     end
  -nok_1: print "nok 1\n"
  -  print I5
  -  print "\n"
  +nok_1: print 2, "nok 1\n"
  +  print 2, I5
  +  print 2, "\n"
     end
  -nok_2: print "nok 2\n"
  +nok_2: print 2, "nok 2\n"
     end
   CODE
   loaded
  @@ -245,9 +247,9 @@
   
   output_is(<<'CODE', <<'OUTPUT', "nci_i_t");
     loadlib P1, "libnci.so"
  -  print "loaded\n"
  +  print 2, "loaded\n"
     dlfunc P0, P1, "nci_it", "it"
  -  print "dlfunced\n"
  +  print 2, "dlfunced\n"
     set I0, 1  # prototype used - unchecked
     set I1, 0  # items on stack - unchecked
     set S5, "ko\n"
  @@ -258,13 +260,13 @@
     ne I2, 0, nok_2
     ne I3, 0, nok_2
     ne I4, 0, nok_2
  -  print "ok 2\n"
  +  print 2, "ok 2\n"
     end
  -nok_1: print "nok 1\n"
  -  print I5
  -  print "\n"
  +nok_1: print 2, "nok 1\n"
  +  print 2, I5
  +  print 2, "\n"
     end
  -nok_2: print "nok 2\n"
  +nok_2: print 2, "nok 2\n"
     end
   CODE
   loaded
  
  
  
  1.1                  parrot/tools/dev/mk_native_pbc
  
  Index: mk_native_pbc
  ===================================================================
  #!/bin/sh
  
  # generate t/native_pbc_{1,2}.pbc
  # this should be run on i386 systems to regenerate the first two
  # native tests
  # NOTE: This will need a perl compiled with long double support
  # NOTE2: Installing ccache speeds this process up considerably
  
  # run it as:
  # $ sh tools/dev/mk_native_pbc
  
  make progclean
  perl Configure.pl --debugging --floatval="long double" --nomanicheck
  tail myconfig
  make -s
  #cp parrot parrot-d12
  cd languages/imcc
  make clean && make -s
  #cp imcc imcc-d12
  cd -
  imcc -o n.pbc t/op/number_1.pasm
  mv n.pbc t/native_pbc/number_2.pbc
  
  make progclean
  perl Configure.pl --debugging --floatval=double --nomanicheck
  tail myconfig
  make -s
  #cp parrot parrot-d8
  cd languages/imcc
  make clean && make -s
  #cp imcc imcc-d8
  cd -
  imcc -o n.pbc t/op/number_1.pasm
  mv n.pbc t/native_pbc/number_1.pbc
  
  make pdump
  pdump -h t/native_pbc/number_1.pbc
  pdump -h t/native_pbc/number_2.pbc
  
  perl t/harness t/native_pbc/number.t
  
  
  

Reply via email to