rsp_regr_vu_rom_tests.c 2.36 KB
#include <sys/types.h>
#ifdef __sgi__
#include <sys/sbd.h>
#endif
#include <sys/stat.h>
#include <sys/mman.h>
#ifdef __sgi__
#include <sys/sema.h>
#endif
#include <netinet/in.h>

#include <errno.h>
#include <stdio.h>
#include <fcntl.h>
#include <stdlib.h>
#include <getopt.h>

#include <rcp.h>
#include <rsp.h>

/* From $ROOT/usr/include/ide, which is installed from PR/diags/include */
#include "diag.h"
#include "dbg_comm.h"

#define RSP_TEST_BASE	001

static int NumFailures = 0;

/* From rsp_regr_common.c: */
extern int generic_rsp_regression (const char *file_name);
extern void imem_init(FILE *file_p);
extern int rsp_regrInit();
extern int rsp_regrDo(TEST_REF *test_ref);
extern int rsp_regr(TEST_REF TestRefs[]);

int rom_test1();
int rom_test2();
int rom_test3();
int rom_test4();
int rom_test5();
int rom_test6();
int rom_test7();
int rom_test8();

/*
 * An array of tests, each of which corresponds to a separate menu
 * item callable from the master ide menu.
 */
static TEST_REF TestRefs[] = {
  {"rom_test1", 		RSP_TEST_BASE+0, rom_test1},
  {"rom_test2", 		RSP_TEST_BASE+1, rom_test2},
  {"rom_test3", 		RSP_TEST_BASE+2, rom_test3},
  {"rom_test4", 		RSP_TEST_BASE+3, rom_test4},
  {"rom_test5", 		RSP_TEST_BASE+4, rom_test5},
  {"rom_test6", 		RSP_TEST_BASE+5, rom_test6},
  {"rom_test7", 		RSP_TEST_BASE+6, rom_test7},
  {"rom_test8", 		RSP_TEST_BASE+7, rom_test8},
    {"",0,0}
};

static int failed_tests[512];

/*
 * diagnostic entry point:
 *
 * Each separately invokable ide diagnostic command corresponds to an
 * independent ".c" module; the entry point herein must match
 * the test name as specified in the rspcmd.awk script.  These command
 * names correspond to the names you see from the ide menu.  For this
 * module, there will be an ide command "rsp_regr".
 */

int rsp_regr_vu_rom_tests(void) {rsp_regr(TestRefs);}

/*
 * Tests
 */

int rom_test1() {return generic_rsp_regression("tests/rom_test1");}
int rom_test2() {return generic_rsp_regression("tests/rom_test2");}
int rom_test3() {return generic_rsp_regression("tests/rom_test3");}
int rom_test4() {return generic_rsp_regression("tests/rom_test4");}
int rom_test5() {return generic_rsp_regression("tests/rom_test5");}
int rom_test6() {return generic_rsp_regression("tests/rom_test6");}
int rom_test7() {return generic_rsp_regression("tests/rom_test7");}
int rom_test8() {return generic_rsp_regression("tests/rom_test8");}