Dali 3D User Interface Engine
tct-dali-adaptor-internal-core.cpp
Go to the documentation of this file.
1 #include <string.h>
2 #include <getopt.h>
3 #include <stdlib.h>
4 #include <test-harness.h>
5 #include "tct-dali-adaptor-internal-core.h"
6 
7 int main(int argc, char * const argv[])
8 {
10 
11  const char* optString = "rs";
12  bool optRerunFailed(true);
13  bool optRunSerially(false);
14 
15  int nextOpt = 0;
16  do
17  {
18  nextOpt = getopt( argc, argv, optString );
19  switch(nextOpt)
20  {
21  case 'r':
22  optRerunFailed = true;
23  break;
24  case 's':
25  optRunSerially = true;
26  break;
27  case '?':
28  TestHarness::Usage(argv[0]);
30  break;
31  }
32  } while( nextOpt != -1 );
33 
34  if( optind == argc ) // no testcase name in argument list
35  {
36  if( optRunSerially )
37  {
38  result = TestHarness::RunAll( argv[0], tc_array );
39  }
40  else
41  {
42  result = TestHarness::RunAllInParallel( argv[0], tc_array, optRerunFailed );
43  }
44  }
45  else
46  {
47  // optind is index of next argument - interpret as testcase name
48  result = TestHarness::FindAndRunTestCase(tc_array, argv[optind]);
49  }
50  return result;
51 }
Dali Docs Home
Read more about Dali