Next Generation Blueprint
Document design solutions for next-generation blueprint of
CodeBricklayer
.
#include <stdio.h>
#include "argparse.h"
#include "testcase.h"
#include "common/debug.h"
===
/…
static int ${mainFuncName}_entry_test_intrrupt(void *tcd, int argc, char *argv[])
{
int ret = TEST_SUCCESS;
/…
${dataType} ${varName} = ${Deafult};
…/
struct argparse argparse;
struct argparse_option options[] = {
OPT_HELP(),
/…
${OptType}('${optionChar}', "${optionStr}", ${varName}, "${comment}", NULL, 0, 0),
…/
OPT_END(),
};
argparse_init(&argparse, options, NULL, 0);
argc = argparse_parse(&argparse, argc, (const char **)argv);
if (argc <0)
return TEST_FAILURE;
/* Your code is here. */
return TEST_SUCCESS;
}
…/
/—
,
mainFuncName
mmc_cdns
/—
,
dataType,varName,Deafult
bool,interrupt,false
char *,position,NULL
—/
/—
,
OptType,optionChar,optionStr,varName,comment
OPT_BOOLEAN,i,interrupt,interrupt,interrupt
OPT_STRING,p,position,position,aaa
—/
mmc_cdns
/—
—/
—/