1 #include <aros/debug.h>
5 CONST_STRPTR scriptname
;
13 int main(int argc
, char **argv
)
17 scriptname
= "testscript";
25 PutStr("Usage runtest [scriptfile]\n");
28 scripthandle
= Open(scriptname
, MODE_OLDFILE
);
31 PutStr("Can't open file\n");
35 PutStr("Reading commands from file ");
37 PutStr("\nOutput will be sent to the debugging console\n\n");
39 while (FGets(scripthandle
, command
, sizeof command
))
41 if (command
[0] != '#' && command
[0] != '\n')
43 bug("====================================\n");
44 bug("Running command: %s", command
);
45 error
= SystemTags(command
, TAG_DONE
);
46 bug("returns: %d\n", error
);
48 if (error
>= RETURN_FAIL
)
50 else if (error
>= RETURN_ERROR
)
52 else if (error
>= RETURN_WARN
)
58 bug("====================================\n");
59 bug("Summary: ok %d warn %d error %d fail %d\n", okcnt
, warncnt
, errorcnt
, failcnt
);