Merged changes from 3.14 branch to revno 12594
This commit is contained in:
@@ -81,6 +81,8 @@ else
|
||||
host:
|
||||
endif
|
||||
|
||||
-include $(CONFIG)/RULES_FILE_TYPE
|
||||
|
||||
-include $(CONFIG)/RULES.Db
|
||||
|
||||
#---------------------------------------------------------------
|
||||
@@ -122,8 +124,6 @@ LIBTARGETS += $(LIBNAME) $(INSTALL_LIBS) $(TESTLIBNAME) \
|
||||
$(LOADABLE_SHRLIBNAME) $(INSTALL_LOADABLE_SHRLIBS)
|
||||
|
||||
|
||||
-include $(CONFIG)/RULES_FILE_TYPE
|
||||
|
||||
# Main targets
|
||||
|
||||
install: buildInstall
|
||||
|
||||
@@ -979,6 +979,7 @@ static void event_task (void *pParm)
|
||||
{
|
||||
struct event_user * const evUser = (struct event_user *) pParm;
|
||||
struct event_que * ev_que;
|
||||
unsigned char pendexit;
|
||||
|
||||
/* init hook */
|
||||
if (evUser->init_func) {
|
||||
@@ -1020,9 +1021,10 @@ static void event_task (void *pParm)
|
||||
event_read (ev_que);
|
||||
epicsMutexMustLock ( evUser->lock );
|
||||
}
|
||||
pendexit = evUser->pendexit;
|
||||
epicsMutexUnlock ( evUser->lock );
|
||||
|
||||
} while ( ! evUser->pendexit );
|
||||
} while( ! pendexit );
|
||||
|
||||
epicsMutexDestroy(evUser->firstque.writelock);
|
||||
|
||||
|
||||
@@ -211,7 +211,7 @@ int testDone(void) {
|
||||
|
||||
/* Our test harness, for RTEMS and vxWorks */
|
||||
|
||||
static void harnessExit(void *dummy) {
|
||||
void testHarnessExit(void *dummy) {
|
||||
epicsTimeStamp ended;
|
||||
int Faulty;
|
||||
|
||||
@@ -248,7 +248,7 @@ static void harnessExit(void *dummy) {
|
||||
|
||||
void testHarness(void) {
|
||||
epicsThreadOnce(&onceFlag, testOnce, NULL);
|
||||
epicsAtExit(harnessExit, NULL);
|
||||
epicsAtExit(testHarnessExit, NULL);
|
||||
Harness = 1;
|
||||
Programs = 0;
|
||||
Tests = 0;
|
||||
|
||||
@@ -43,9 +43,11 @@ epicsShareFunc int testDone(void);
|
||||
|
||||
typedef int (*TESTFUNC)(void);
|
||||
epicsShareFunc void testHarness(void);
|
||||
epicsShareFunc void testHarnessExit(void *dummy);
|
||||
epicsShareFunc void runTestFunc(const char *name, TESTFUNC func);
|
||||
|
||||
#define runTest(func) runTestFunc(#func, func)
|
||||
#define testHarnessDone() testHarnessExit(0)
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
||||
@@ -79,6 +79,7 @@ epicsReadlineEnd(void *context)
|
||||
|
||||
#include <readline/readline.h>
|
||||
#include <readline/history.h>
|
||||
#include <unistd.h>
|
||||
|
||||
struct readlineContext {
|
||||
FILE *in;
|
||||
@@ -138,6 +139,14 @@ epicsReadline (const char *prompt, void *context)
|
||||
free (readlineContext->line);
|
||||
readlineContext->line = NULL;
|
||||
if (readlineContext->in == NULL) {
|
||||
if (!isatty(fileno(stdout))) {
|
||||
/* The libedit readline emulator on Darwin doesn't
|
||||
* print the prompt when the terminal isn't a tty.
|
||||
*/
|
||||
fputs (prompt, stdout);
|
||||
fflush (stdout);
|
||||
rl_already_prompted = 1;
|
||||
}
|
||||
rlState = rlBusy;
|
||||
line = readline (prompt);
|
||||
rlState = rlIdle;
|
||||
|
||||
@@ -101,7 +101,12 @@ void epicsRunLibComTests(void)
|
||||
runTest(taskwdTest);
|
||||
|
||||
/*
|
||||
* Exit must come last as it never returns
|
||||
* Report now in case epicsExitTest dies
|
||||
*/
|
||||
testHarnessDone();
|
||||
|
||||
/*
|
||||
* epicsExitTest must come last as it never returns
|
||||
*/
|
||||
runTest(epicsExitTest);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user