Testing: Fixed filters test harness build on RTEMS

Added a new Files: line to the testspec file to document which
files need to be available for the tests to be run properly.
This is generated from the Makefile variable TESTFILES.
This commit is contained in:
Andrew Johnson
2012-07-13 13:18:39 -05:00
parent cc088e77b6
commit f5a424eb33
5 changed files with 22 additions and 30 deletions
+3
View File
@@ -30,6 +30,7 @@ dbChannelTest_SRCS += dbChannelTest.c
dbChannelTest_SRCS += dbChannelTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += dbChannelTest.c
testHarness_SRCS += dbChannelTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/dbChannelTest.dbd ../xRecord.db
TESTS += dbChannelTest
TARGETS += $(COMMON_DIR)/chfPluginTest.dbd
@@ -40,6 +41,7 @@ chfPluginTest_SRCS += chfPluginTest.c
chfPluginTest_SRCS += chfPluginTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += chfPluginTest.c
testHarness_SRCS += chfPluginTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/chfPluginTest.dbd
TESTS += chfPluginTest
TARGETS += $(COMMON_DIR)/arrShorthandTest.dbd
@@ -50,6 +52,7 @@ arrShorthandTest_SRCS += arrShorthandTest.c
arrShorthandTest_SRCS += arrShorthandTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += arrShorthandTest.c
testHarness_SRCS += arrShorthandTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/arrShorthandTest.dbd
TESTS += arrShorthandTest
# The testHarness runs all the test programs in a known working order.
-30
View File
@@ -5,40 +5,10 @@
* in file LICENSE that is included with this distribution.
\*************************************************************************/
#ifdef __rtems__
#include <stdio.h>
#include <envDefs.h>
#include <sys/stat.h>
#include <sys/types.h>
#include <unistd.h>
#endif /* __rtems__ */
extern void epicsRunDbTests(void);
int main(int argc, char **argv)
{
#ifdef __rtems__
struct stat s;
printf("Try to create /tmp\n");
umask(0);
if(mkdir("/tmp", 0777)!=0)
perror("Can't create /tmp");
if(stat("/tmp", &s)==0) {
printf("Stat /tmp: %o %u,%u\n", s.st_mode, s.st_uid, s.st_gid);
}
epicsEnvSet("TMPDIR","/tmp");
{
char name[40];
if(getcwd(name,40))
printf("Running from %s\n", name);
else
printf("Can't determine PWD");
}
#endif
epicsRunDbTests(); /* calls epicsExit(0) */
return 0;
}