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

View File

@@ -325,6 +325,7 @@ testspec: $(TESTSCRIPTS_$(BUILD_CLASS))
@echo OS-class: $(OS_CLASS) > $@
@echo Target-arch: $(T_A) >> $@
$(if $^, @echo Tests: $^ >> $@)
$(if $(TESTFILES), @echo Files: $(TESTFILES) >> $@)
$(if $(TESTSPEC_$(OS_CLASS)), @echo "Harness: $(TESTSPEC_$(OS_CLASS))" >> $@)
# If there's a perl test script (.plt) available, use it

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.

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;
}

View File

@@ -20,6 +20,7 @@ tsTest_SRCS += tsTest.c
tsTest_SRCS += tsTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += tsTest.c
testHarness_SRCS += tsTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/tsTest.dbd ../xRecord.db
TESTS += tsTest
TARGETS += $(COMMON_DIR)/dbndTest.dbd
@@ -30,6 +31,7 @@ dbndTest_SRCS += dbndTest.c
dbndTest_SRCS += dbndTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += dbndTest.c
testHarness_SRCS += dbndTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/dbndTest.dbd
TESTS += dbndTest
TARGETS += $(COMMON_DIR)/arrTest.dbd
@@ -41,6 +43,7 @@ arrTest_SRCS += arrTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += arrRecord.c
testHarness_SRCS += arrTest.cpp
testHarness_SRCS += arrTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/arrTest.dbd
TESTS += arrTest
TARGETS += $(COMMON_DIR)/syncTest.dbd
@@ -51,6 +54,7 @@ syncTest_SRCS += syncTest.c
syncTest_SRCS += syncTest_registerRecordDeviceDriver.cpp
testHarness_SRCS += syncTest.c
testHarness_SRCS += syncTest_registerRecordDeviceDriver.cpp
TESTFILES += $(COMMON_DIR)/syncTest.dbd
TESTS += syncTest
# epicsRunFilterTests runs all the test programs in a known working order.

View File

@@ -0,0 +1,14 @@
/*************************************************************************\
* Copyright (c) 2012 UChicago Argonne LLC, as Operator of Argonne
* National Laboratory.
* EPICS BASE is distributed subject to a Software License Agreement found
* in file LICENSE that is included with this distribution.
\*************************************************************************/
extern void epicsRunFilterTests(void);
int main(int argc, char **argv)
{
epicsRunFilterTests(); /* calls epicsExit(0) */
return 0;
}