libCom/test: fixup RTEMS tests to run clean

This commit is contained in:
Michael Davidsaver
2016-02-15 12:29:06 -05:00
committed by Michael Davidsaver
parent 48da96cce5
commit 0575d3764f
2 changed files with 12 additions and 0 deletions

View File

@@ -127,6 +127,12 @@ MAIN(epicsStdioTest)
testPlan(163);
#endif
testEpicsSnprintf();
#ifdef __rtems__
/* ensure there is a writeable area */
mkdir( "/tmp", S_IRWXU );
testStdoutRedir("/tmp/report");
#else
testStdoutRedir("report");
#endif
return testDone();
}

View File

@@ -421,8 +421,14 @@ MAIN(epicsStdlibTest)
testOk(epicsScanDouble("NAN", &d) && isnan(d), "Double 'NAN'");
testOk(epicsScanFloat("Nan", &f) && isnan(f), "Float 'Nan'");
testOk(epicsScanDouble("Nan", &d) && isnan(d), "Double 'Nan'");
#ifdef __rtems__
testTodoBegin("RTEMS (newlib) parser doesn't recognise 'nan()'");
#endif
testOk(epicsScanFloat("nan()", &f) && isnan(f), "Float 'nan()'");
testOk(epicsScanDouble("nan()", &d) && isnan(d), "Double 'nan()'");
#ifdef __rtems__
testTodoEnd();
#endif
testOk(epicsScanFloat("INF", &f) && f == epicsINF,
"Float 'INF'");