1 /*
2 * Copyright (c) 2010, Texas Instruments Incorporated
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 *
9 * * Redistributions of source code must retain the above copyright
10 * notice, this list of conditions and the following disclaimer.
11 *
12 * * Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution.
15 *
16 * * Neither the name of Texas Instruments Incorporated nor the names of
17 * its contributors may be used to endorse or promote products derived
18 * from this software without specific prior written permission.
19 *
20 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
21 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO,
22 * THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
23 * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR
24 * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
25 * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
26 * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
27 * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
28 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
29 * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE,
30 * EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
31 *
32 */
33 metaonly interface ITest {
34
35 enum TestStatus {
36 TEST_NOTRUN,
37 TEST_PASS,
38 TEST_FAIL,
39 TEST_NOTAPPLY,
40 TEST_RUNNING,
41 TEST_RUNERROR
42 };
43
44 enum TestDetailLevel {
45 DETAILLEVEL_FAILDETAILS = 0,
46 DETAILLEVEL_TESTLOG = 1,
47 DETAILLEVEL_TESTOUTPUT = 2
48 };
49
50 // this is defined in <TestModule>.xdc
51 struct Test {
52 string id;
53 string title;
54 };
55
56 // this is returned by <TestModule>.getAttrs()
57 struct TestAttrs {
58 string description;
59 bool isPerformanceTest;
60 };
61
62 // this is returned by Compiler.getCompilerInfo, stored in AlgoParams
63 struct CompilerParams {
64 bool isTICompiler;
65 bool isC6x;
66 string libFormat;
67 string version;
68 string log;
69 };
70
71 // this is given to <TestModule>.run()
72 struct AlgoParams {
73 string moduleName;
74 string vendor;
75 string interfaceName;
76 string architecture;
77 string baseDir;
78 string library;
79 string headers[];
80 CompilerParams compilerParams;
81 };
82
83 // this is given to <TestModule>.run()
84 struct TestSettings {
85 string cgtoolsDir;
86 string cgxmlDir;
87 };
88
89 // this is returned by <TestModule>.run()
90 struct TestResult {
91 TestStatus status; // return code
92
93 string statusDetails; // elaborate description of what went
94 // wrong (if it did, otherwise short)
95
96 System.RunResult runResult; // as-is return structure from test
97 // command execution, needed only if
98 // status is TEST_RUNERROR
99 };
100
101 // reset state of the test (usually an empty function)
102 void reset( string testId );
103
104 // returns basically test description
105 TestAttrs getAttrs( string testId );
106
107 // runs the test -- this is the real thing
108 TestResult run( string testId, AlgoParams algoParams,
109 TestSettings testSettings,
110 int testDetailLevel, any cbPrintLog );
111 }
112
113 /*
114 * @(#) ti.xdais.qualiti; 1, 0, 0,102; 5-4-2010 08:46:16; /db/wtree/library/trees/dais/dais-q11x/src/
115 */
116