mirror of
https://github.com/elliotnunn/mac-rom.git
synced 2025-01-19 21:30:04 +00:00
4325cdcc78
Resource forks are included only for .rsrc files. These are DeRezzed into their data fork. 'ckid' resources, from the Projector VCS, are not included. The Tools directory, containing mostly junk, is also excluded.
61 lines
1.2 KiB
C
61 lines
1.2 KiB
C
/*
|
|
File: SubtestController.c
|
|
|
|
Contains: This file contains the subtest controller functions
|
|
of the Common Test Environment, which control locating
|
|
and executing subtests.
|
|
|
|
Written by: Mark Appleman
|
|
|
|
Copyright: © 1990 by Apple Computer, Inc., all rights reserved.
|
|
|
|
Change History (most recent first):
|
|
|
|
<1> 9/4/90 SS first checked in
|
|
|
|
To Do:
|
|
*/
|
|
|
|
#include "SubtestController.h"
|
|
|
|
SubtestNode *FindSubtest(CTEGlobals *globs, SubtestID id)
|
|
{
|
|
return((SubtestNode *)FindKeyedNode(&globs->subtestList, id)) ;
|
|
}
|
|
|
|
|
|
SubtestErr DoSubtest(CTEGlobals *globs)
|
|
{
|
|
SubtestNode *theSubtestNode ;
|
|
Subtest *theSubtest ;
|
|
SubtestErr err ;
|
|
|
|
// Find the subtest node in the subtest list.
|
|
if(NULL == (theSubtestNode = FindSubtest(globs, globs->subtestID)))
|
|
{
|
|
err = CTE_Kernel_Err_SubtestNotAvailable ;
|
|
goto ErrorExit ;
|
|
}
|
|
|
|
theSubtest = theSubtestNode->subtestPtr ;
|
|
|
|
DoAgain :
|
|
switch(globs->execMode)
|
|
{
|
|
case dontExecSubtestMode :
|
|
err = CTE_Kernel_Err_SubtestNotExecuted ;
|
|
break ;
|
|
|
|
case normalMode :
|
|
err = (*theSubtest)(globs, globs->subtestParams, globs->subtestResults) ;
|
|
break ;
|
|
|
|
default :
|
|
err = CTE_Kernel_Err_UnknownExecMode ;
|
|
}
|
|
|
|
ErrorExit :
|
|
return(err) ;
|
|
}
|
|
|