Changeset c2673ab


Ignore:
Timestamp:
May 22, 2010, 10:33:30 PM (10 years ago)
Author:
Nelson Elhage <nelhage@mit.edu>
Branches:
master, release-1.7, release-1.8, release-1.9
Children:
81601a6
Parents:
f034ac0
git-author:
Nelson Elhage <nelhage@mit.edu> (05/19/10 00:17:47)
git-committer:
Nelson Elhage <nelhage@mit.edu> (05/22/10 22:33:30)
Message:
Initialize perl inside the tester.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • tester.c

    rf034ac0 rc2673ab  
    77int numtests;
    88
     9int owl_regtest(void);
    910int owl_util_regtest(void);
    1011int owl_dict_regtest(void);
     
    1920  FILE *rnull = fopen("/dev/null", "r");
    2021  FILE *wnull = fopen("/dev/null", "w");
     22  char *perlerr;
     23  int status = 0;
    2124  newterm("xterm", wnull, rnull);
    2225  /* initialize global structures */
    2326  owl_global_init(&g);
    2427
     28  perlerr = owl_perlconfig_initperl(NULL, &argc, &argv, &env);
     29  if (perlerr) {
     30    endwin();
     31    fprintf(stderr, "Internal perl error: %s\n", perlerr);
     32    status = 1;
     33    goto out;
     34  }
     35  owl_global_complete_setup(&g);
     36
     37  status = owl_regtest();
     38
     39 out:
     40  /* probably not necessary, but tear down the screen */
     41  endwin();
     42  fclose(rnull);
     43  fclose(wnull);
     44  return status;
     45}
     46
     47int owl_regtest(void) {
    2548  numtests = 0;
    2649  int numfailures=0;
     
    4063  printf("1..%d\n", numtests);
    4164
    42   /* probably not necessary, but tear down the screen */
    43   endwin();
    44   fclose(rnull);
    45   fclose(wnull);
    46 
    4765  return(numfailures);
    4866}
Note: See TracChangeset for help on using the changeset viewer.