* Testcase Execution:
Runtest is executed with OMK_RULES environment variable set to the
- name of the actual rules tested.
+ name of the actual rules tested and OMK_TESTSROOT to the directory
+ containing the runtests.py script.
* Testcase Output:
* snip:<snippet name> - this selects all the rules, which contain the
given snippet.
-* python:<python exression> - The python expression is evaluated. The
+* python:<python expression> - The python expression is evaluated. The
global namespace contains the following variables:
- rules: the name of tested rules
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+default_CONFIG = CONFIG_OC_LINCAN=y CONFIG_OC_LINCANRTL=n CONFIG_OC_LINCANVME=n
+default_CONFIG += CONFIG_OC_LINCAN_PORTIO_ONLY=n CONFIG_OC_LINCAN_MEMIO_ONLY=n
+
+SUBDIRS=subdir
\ No newline at end of file
--- /dev/null
+# Start of OMK config file
+# This file should not be altered manually
+# Overrides should be stored in file config.omk
+
+# Config for subdir
+CONFIG_SUBDIR=y
+# Config for
+CONFIG_OC_LINCAN=y
+CONFIG_OC_LINCANRTL=n
+CONFIG_OC_LINCANVME=n
+CONFIG_OC_LINCAN_PORTIO_ONLY=n
+CONFIG_OC_LINCAN_MEMIO_ONLY=n
--- /dev/null
+#!/bin/sh
+make default-config || exit 2
+echo "Default config differs" > _error
+diff -u config.omk-correct config.omk-default || exit 1
\ No newline at end of file
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+default_CONFIG = CONFIG_SUBDIR=y
# -*-sh-*-
+function error() {
+ echo $1 > _error
+ exit 1
+}
+
+function canttest() {
+ echo $1 > _error
+ exit 2
+}
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+include_HEADERS = x.h periph/sci_regs.h
+nobase_include_HEADERS = periph/sci_channels.h
+renamed_include_HEADERS = x.h->y.h
+renamed_include_HEADERS += orte/orte_config_omk_win32.h->orte/orte_config.h
--- /dev/null
+.:
+orte
+periph
+sci_regs.h
+x.h
+y.h
+
+./orte:
+orte_config.h
+
+./periph:
+sci_channels.h
--- /dev/null
+/* orte/include/orte/orte_config.h. Generated by configure. */
+/* orte/include/orte/orte_config.h.in. Generated from configure.in by autoheader. */
+
+/* Define to enable JORTE's compilation */
+/* #undef CONFIG_JORTE */
+
+/* Define if is target CYGWIN */
+/* #undef CONFIG_ORTE_CYGWIN */
+
+/* Define if linux kernel is found */
+/* #undef CONFIG_ORTE_KERNEL */
+
+/* Define if is target MINGW */
+#define CONFIG_ORTE_MINGW 1
+
+/* Define to enable ORTE's RT support */
+/* #undef CONFIG_ORTE_RT */
+
+/* Define if kernel is RTAI patched */
+/* #undef CONFIG_ORTE_RTAI */
+
+/* Define if kernel is RTLinux patched */
+/* #undef CONFIG_ORTE_RTL */
+
+/* Define if onetd stack is found */
+/* #undef CONFIG_ORTE_RTL_ONETD */
+
+/* Define if wIP stack is found */
+/* #undef CONFIG_ORTE_RTL_WIP */
+
+/* Define if is target a unix system */
+/* #undef CONFIG_ORTE_UNIX */
+
+/* Define if is target windows */
+#define CONFIG_ORTE_WIN 1
+
+/* Define to 1 if you have the <arpa/inet.h> header file. */
+/* #undef HAVE_ARPA_INET_H */
+
+/* Define to 1 if you have the <asm/byteorder.h> header file. */
+/* #undef HAVE_ASM_BYTEORDER_H */
+
+/* Define to 1 if you have the <byteswap.h> header file. */
+/* #undef HAVE_BYTESWAP_H */
+
+/* Define to 1 if you have the <ctype.h> header file. */
+#define HAVE_CTYPE_H 1
+
+/* Define to 1 if you have the <dlfcn.h> header file. */
+/* #undef HAVE_DLFCN_H */
+
+/* Define to 1 if you have the <errno.h> header file. */
+#define HAVE_ERRNO_H 1
+
+/* Define to 1 if you have the <fcntl.h> header file. */
+#define HAVE_FCNTL_H 1
+
+/* Define to 1 if you have the `gethostbyname' function. */
+/* #undef HAVE_GETHOSTBYNAME */
+
+/* Define to 1 if you have the <getopt.h> header file. */
+#define HAVE_GETOPT_H 1
+
+/* Define to 1 if you have the `getopt_long' function. */
+/* #undef HAVE_GETOPT_LONG */
+
+/* Define for ORTE getopt_long self implemetation */
+#define HAVE_GETPOT_LONG_ORTE 1
+
+/* Define to 1 if you have the <inttypes.h> header file. */
+#define HAVE_INTTYPES_H 1
+
+/* Define to 1 if you have the `c_r' library (-lc_r). */
+/* #undef HAVE_LIBC_R */
+
+/* Define to 1 if you have the `nsl' library (-lnsl). */
+/* #undef HAVE_LIBNSL */
+
+/* Define to 1 if you have the `popt' library (-lpopt). */
+/* #undef HAVE_LIBPOPT */
+
+/* Define to 1 if you have the `pthread' library (-lpthread). */
+/* #undef HAVE_LIBPTHREAD */
+
+/* Define to 1 if you have the `socket' library (-lsocket). */
+/* #undef HAVE_LIBSOCKET */
+
+/* Define to 1 if you have the `ws2_32' library (-lws2_32). */
+#define HAVE_LIBWS2_32 1
+
+/* Define to 1 if you have the <linux/ctype.h> header file. */
+/* #undef HAVE_LINUX_CTYPE_H */
+
+/* Define to 1 if you have the <linux/if.h> header file. */
+/* #undef HAVE_LINUX_IF_H */
+
+/* Define to 1 if you have the <linux/in.h> header file. */
+/* #undef HAVE_LINUX_IN_H */
+
+/* Define to 1 if you have the <linux/module.h> header file. */
+/* #undef HAVE_LINUX_MODULE_H */
+
+/* Define to 1 if you have the <linux/socket.h> header file. */
+/* #undef HAVE_LINUX_SOCKET_H */
+
+/* Define to 1 if you have the <linux/string.h> header file. */
+/* #undef HAVE_LINUX_STRING_H */
+
+/* Define to 1 if you have the <linux/time.h> header file. */
+/* #undef HAVE_LINUX_TIME_H */
+
+/* Define to 1 if you have the <linux/types.h> header file. */
+/* #undef HAVE_LINUX_TYPES_H */
+
+/* Define to 1 if you have the <memory.h> header file. */
+#define HAVE_MEMORY_H 1
+
+/* Define to 1 if you have the <netdb.h> header file. */
+/* #undef HAVE_NETDB_H */
+
+/* Define to 1 if you have the <netinet/in.h> header file. */
+/* #undef HAVE_NETINET_IN_H */
+
+/* Define to 1 if you have the <net/if.h> header file. */
+/* #undef HAVE_NET_IF_H */
+
+/* Define to 1 if you have the <nictab.h> header file. */
+/* #undef HAVE_NICTAB_H */
+
+/* Define to 1 if you have the <nic.h> header file. */
+/* #undef HAVE_NIC_H */
+
+/* Define to 1 if you have the <onetd.h> header file. */
+/* #undef HAVE_ONETD_H */
+
+/* Define to 1 if you have the <pthread.h> header file. */
+/* #undef HAVE_PTHREAD_H */
+
+/* Define to 1 if you have the <rtl.h> header file. */
+/* #undef HAVE_RTL_H */
+
+/* Define to 1 if you have the <rtl_malloc.h> header file. */
+/* #undef HAVE_RTL_MALLOC_H */
+
+/* Define to 1 if you have the <rtnet.h> header file. */
+/* #undef HAVE_RTNET_H */
+
+/* Define to 1 if you have the <signal.h> header file. */
+#define HAVE_SIGNAL_H 1
+
+/* Define to 1 if you have the <stdarg.h> header file. */
+#define HAVE_STDARG_H 1
+
+/* Define to 1 if you have the <stdint.h> header file. */
+#define HAVE_STDINT_H 1
+
+/* Define to 1 if you have the <stdio.h> header file. */
+#define HAVE_STDIO_H 1
+
+/* Define to 1 if you have the <stdlib.h> header file. */
+#define HAVE_STDLIB_H 1
+
+/* Define to 1 if you have the <strings.h> header file. */
+#define HAVE_STRINGS_H 1
+
+/* Define to 1 if you have the <string.h> header file. */
+#define HAVE_STRING_H 1
+
+/* Define to 1 if you have the <sys/ioctl.h> header file. */
+/* #undef HAVE_SYS_IOCTL_H */
+
+/* Define to 1 if you have the <sys/socket.h> header file. */
+/* #undef HAVE_SYS_SOCKET_H */
+
+/* Define to 1 if you have the <sys/sockio.h> header file. */
+/* #undef HAVE_SYS_SOCKIO_H */
+
+/* Define to 1 if you have the <sys/stat.h> header file. */
+#define HAVE_SYS_STAT_H 1
+
+/* Define to 1 if you have the <sys/time.h> header file. */
+#define HAVE_SYS_TIME_H 1
+
+/* Define to 1 if you have the <sys/types.h> header file. */
+#define HAVE_SYS_TYPES_H 1
+
+/* Define to 1 if you have the <time.h> header file. */
+/* #undef HAVE_TIME_H */
+
+/* Define to 1 if you have the <udp.h> header file. */
+/* #undef HAVE_UDP_H */
+
+/* Define to 1 if you have the <unistd.h> header file. */
+#define HAVE_UNISTD_H 1
+
+/* Define to 1 if you have the <w32api/windows.h> header file. */
+/* #undef HAVE_W32API_WINDOWS_H */
+
+/* Define to 1 if you have the <windows.h> header file. */
+#define HAVE_WINDOWS_H 1
+
+/* Define to 1 if you have the <winsock2.h> header file. */
+#define HAVE_WINSOCK2_H 1
+
+/* Define to 1 if you have the <ws2tcpip.h> header file. */
+#define HAVE_WS2TCPIP_H 1
+
+/* Define to the address where bug reports for this package should be sent. */
+#define ORTE_PACKAGE_BUGREPORT "petr.smolik@wo.cz"
+
+/* Define to the full name of this package. */
+#define ORTE_PACKAGE_NAME "orte"
+
+/* Define to the full name and version of this package. */
+#define ORTE_PACKAGE_STRING "orte 0.3.1"
+
+/* Define to the one symbol short name of this package. */
+#define ORTE_PACKAGE_TARNAME "orte"
+
+/* Define to the version of this package. */
+#define ORTE_PACKAGE_VERSION "0.3.1"
+
+/* Define to 1 if you have the ANSI C header files. */
+#define STDC_HEADERS 1
+
+/* Define to 1 if your processor stores words with the most significant byte
+ first (like Motorola and SPARC, unlike Intel and VAX). */
+/* #undef WORDS_BIGENDIAN */
+
+
+#ifndef _GNU_SOURCE
+ #define _GNU_SOURCE
+#endif
+
+
+/* Define to empty if `const' does not conform to ANSI C. */
+/* #undef const */
+
+/* Define to `__inline__' or `__inline' if that's what the C compiler
+ calls it, or to nothing if 'inline' is not supported under any name. */
+#ifndef __cplusplus
+/* #undef inline */
+#endif
--- /dev/null
+/*******************************************************************
+ Components for embedded applications builded for
+ laboratory and medical instruments firmware
+
+ sci_channels.h - UART communication for H2638 microcontroller
+
+ (C) 2005 by Michal Sojka <wentasah@centrum.cz>
+
+ The COLAMI components can be used and copied according to next
+ license alternatives
+ - MPL - Mozilla Public License
+ - GPL - GNU Public License
+
+ *******************************************************************/
+#ifndef _SCI_PORTS_H
+#define _SCI_PORTS_H
+
+#include <periph/sci_rs232.h>
+#include <system_def.h>
+
+extern sci_info_t sci_rs232_chan0, sci_rs232_chan1, sci_rs232_chan2;
+
+extern sci_info_t *sci_rs232_chan_array[];
+
+#ifndef SCI_RS232_CHAN_DEFAULT
+#define SCI_RS232_CHAN_DEFAULT 0
+#endif
+
+/**
+ * This variable selects the default channel for use by IO functions
+ * (prtinf etc.). You can change the value of this variable in your
+ * application or by defining SCI_RS232_CHAN_DEFAULT symbol (probably
+ * in system_def.h).
+ */
+extern int sci_rs232_chan_default;
+
+#endif
--- /dev/null
+/*******************************************************************
+ Components for embedded applications builded for
+ laboratory and medical instruments firmware
+
+ sci_regs.h - UART communication for H2638 microcontroller
+
+ (C) 2005 by Michal Sojka <wentasah@centrum.cz>
+ (C) 2005 by Petr Kovacik <kovacp1@fel.cvut.cz>
+
+ The COLAMI components can be used and copied according to next
+ license alternatives
+ - MPL - Mozilla Public License
+ - GPL - GNU Public License
+
+ *******************************************************************/
+
+#ifndef _SCI_REGS_H
+#define _SCI_REGS_H
+
+#include <types.h>
+
+struct sci_regs {
+ volatile __u8 rs232_smr;
+ volatile __u8 rs232_brr;
+ volatile __u8 rs232_scr;
+ volatile __u8 rs232_tdr;
+ volatile __u8 rs232_ssr;
+ volatile __u8 rs232_rdr;
+ volatile __u8 rs232_scmr;
+};
+
+
+#endif /* _SCI_REGS_H */
--- /dev/null
+snip:include
--- /dev/null
+#!/bin/sh
+
+. $OMK_TESTSROOT/functions.sh
+
+touch config.omk-default
+make || exit 2
+
+(cd _compiled/include || exit 2; ls -R -1) > ls-include.test || canttest "Can't find include directory"
+
+diff -u ls-include.txt ls-include.test || error "Include files are produced incorrectly"
--- /dev/null
+// Hello
\ No newline at end of file
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+SUBDIRS=lincan
+
+default_CONFIG = CONFIG_TEST_NUM=123 CONFIG_TEST_STR="Hello"
+
+
+config_include_HEADERS = global.h
+
+global_DEFINES = CONFIG_OC_LINCAN CONFIG_OC_LINCANRTL \
+ CONFIG_TEST_NUM CONFIG_TEST_STR
--- /dev/null
+# Start of OMK config file
+# This file should not be altered manually
+# Overrides should be stored in file config.omk
+
+# Config for lincan
+CONFIG_OC_LINCAN=y
+CONFIG_OC_LINCANRTL=n
+CONFIG_OC_LINCANVME=n
+CONFIG_OC_LINCAN_PORTIO_ONLY=n
+CONFIG_OC_LINCAN_MEMIO_ONLY=n
+CONFIG_OC_LINCAN_DETAILED_ERRORS=y
+CONFIG_OC_LINCAN_CARD_pip=y
+CONFIG_OC_LINCAN_CARD_pccan=y
+CONFIG_OC_LINCAN_CARD_smartcan=y
+CONFIG_OC_LINCAN_CARD_nsi=y
+CONFIG_OC_LINCAN_CARD_cc_can104=y
+CONFIG_OC_LINCAN_CARD_ems_cpcpci=y
+CONFIG_OC_LINCAN_CARD_pc_i03=y
+CONFIG_OC_LINCAN_CARD_pcm3680=y
+CONFIG_OC_LINCAN_CARD_aim104=y
+CONFIG_OC_LINCAN_CARD_m437=y
+CONFIG_OC_LINCAN_CARD_pcccan=y
+CONFIG_OC_LINCAN_CARD_ssv=y
+CONFIG_OC_LINCAN_CARD_bfadcan=y
+CONFIG_OC_LINCAN_CARD_gensja1000io=y
+CONFIG_OC_LINCAN_CARD_pikronisa=y
+CONFIG_OC_LINCAN_CARD_eb8245=y
+CONFIG_OC_LINCAN_CARD_kv_pcican=y
+CONFIG_OC_LINCAN_CARD_msmcan=y
+CONFIG_OC_LINCAN_CARD_oscar=y
+CONFIG_OC_LINCAN_CARD_adlink7841=y
+CONFIG_OC_LINCAN_CARD_unican=y
+CONFIG_OC_LINCAN_CARD_virtual=y
+CONFIG_OC_LINCAN_CARD_template=y
+CONFIG_OC_LINCAN_CARD_hms30c7202_can=n
+CONFIG_OC_LINCAN_CARD_ns_dev_can=n
+CONFIG_OC_LINCAN_CARD_ipci165=n
+CONFIG_OC_LINCAN_CARD_pimx1=n
+CONFIG_OC_LINCAN_CARD_tscan1=n
+CONFIG_OC_LINCAN_CARD_nsi_canpci=n
+# Config for
+CONFIG_TEST_NUM=123
+CONFIG_TEST_STR=Hello
--- /dev/null
+/* Automatically generated from */
+#ifndef _global_H
+#define _global_H
+#define CONFIG_OC_LINCAN 1
+#define CONFIG_TEST_NUM 123
+#define CONFIG_TEST_STR Hello
+#endif /* _global_H */
--- /dev/null
+/* Automatically generated from */
+#ifndef _LOCAL_CONFIG_H
+#define _LOCAL_CONFIG_H
+#define CONFIG_OC_LINCAN 1
+#define CONFIG_OC_LINCAN_DETAILED_ERRORS 1
+#define CONFIG_OC_LINCAN_CARD_pip 1
+#define CONFIG_OC_LINCAN_CARD_pccan 1
+#define CONFIG_OC_LINCAN_CARD_smartcan 1
+#define CONFIG_OC_LINCAN_CARD_nsi 1
+#define CONFIG_OC_LINCAN_CARD_cc_can104 1
+#define CONFIG_OC_LINCAN_CARD_ems_cpcpci 1
+#define CONFIG_OC_LINCAN_CARD_pc_i03 1
+#define CONFIG_OC_LINCAN_CARD_pcm3680 1
+#define CONFIG_OC_LINCAN_CARD_aim104 1
+#define CONFIG_OC_LINCAN_CARD_m437 1
+#define CONFIG_OC_LINCAN_CARD_pcccan 1
+#define CONFIG_OC_LINCAN_CARD_ssv 1
+#define CONFIG_OC_LINCAN_CARD_bfadcan 1
+#define CONFIG_OC_LINCAN_CARD_gensja1000io 1
+#define CONFIG_OC_LINCAN_CARD_pikronisa 1
+#define CONFIG_OC_LINCAN_CARD_eb8245 1
+#define CONFIG_OC_LINCAN_CARD_kv_pcican 1
+#define CONFIG_OC_LINCAN_CARD_msmcan 1
+#define CONFIG_OC_LINCAN_CARD_oscar 1
+#define CONFIG_OC_LINCAN_CARD_adlink7841 1
+#define CONFIG_OC_LINCAN_CARD_unican 1
+#define CONFIG_OC_LINCAN_CARD_virtual 1
+#define CONFIG_OC_LINCAN_CARD_template 1
+#endif /*_LOCAL_CONFIG_H*/
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+lincan_cards_NAMES = pip pccan smartcan nsi cc_can104 ems_cpcpci \
+ pc_i03 pcm3680 aim104 m437 pcccan ssv bfadcan gensja1000io pikronisa eb8245 \
+ kv_pcican msmcan oscar adlink7841 unican virtual template
+
+lincan_morecards_NAMES = hms30c7202_can ns_dev_can ipci165 pimx1 tscan1 nsi_canpci
+
+default_CONFIG = CONFIG_OC_LINCAN=y CONFIG_OC_LINCANRTL=n CONFIG_OC_LINCANVME=n
+default_CONFIG += CONFIG_OC_LINCAN_PORTIO_ONLY=n CONFIG_OC_LINCAN_MEMIO_ONLY=n
+default_CONFIG += CONFIG_OC_LINCAN_DETAILED_ERRORS=y
+default_CONFIG += $(foreach n, $(lincan_cards_NAMES), CONFIG_OC_LINCAN_CARD_$(n)=y)
+default_CONFIG += $(foreach n, $(lincan_morecards_NAMES), CONFIG_OC_LINCAN_CARD_$(n)=n)
+
+
+LOCAL_CONFIG_H = lincan_config.h
+
+# Local config is not generated if nothing is compiled
+bin_PROGRAMS = configtest
+configtest_SOURCES = configtest.c
--- /dev/null
+#include "lincan_config.h"
+void main(void) {}
--- /dev/null
+#!/bin/sh
+
+. $OMK_TESTSROOT/functions.sh
+
+make default-config || canttest
+make include-pass || error "Can't run make include-pass"
+
+GC=./_compiled/include/global.h
+test -f "$GC" || canttest "Can't find the produced global config"
+
+grep -Fv "/* config file:" $GC | diff -u correct/global.h - || error "Global config differs"
+
+make CC=true || cannot "Can't run make to produce local config"
+LC=$(find _build -wholename '*/lincan/lincan_config.h')
+test -f "$LC" || canttest "Can't find the produced local config"
+grep -Fv "/* config file:" $LC | diff -u correct/lincan_config.h - || error "Local config differs"
+
import shutil
import subprocess
import time
+from xml.sax.saxutils import escape
sys.path.append("..")
import rulesdef
</head>
<body>
<h2>Summary</h2>TODO
- """
+ """ % self.__dict__
s+="""
<h2>Chart</h2>
<table cellpadding='2' border='1'>
else:
if self.exitcode == 1: color=' bgcolor="red"'
elif self.exitcode == 2: color=' bgcolor="yellow"'
- else: color=' bgcolor="silver"'
+ else: color=' bgcolor="gray"'
if self.stdout: stdoutlink="<a href='#stdout-%(tcname)s-%(rules)s'>stdout</a>" % self.__dict__
else: stdoutlink=''
if self.stderr: stderrlink="<a href='#stderr-%(tcname)s-%(rules)s'>stderr</a>" % self.__dict__
'tcname' : self.rules,
'rules' : self.rules,
'exitcode' : self.exitcode,
- 'message' : self.message,
+ 'message' : escape(self.message),
'time' : self.time,
'stdoutlink' : stdoutlink,
'stderrlink' : stderrlink,
vals = {
'tcname':self.tcname,
'rules':self.rules,
- 'stdout':self.stdout,
- 'stderr':self.stderr
+ 'stdout':escape(self.stdout),
+ 'stderr':escape(self.stderr)
}
s=""
if self.stdout: s+="""
os.environ['OMK_RULES'] = rules
filesBefore = self._getFileSet()
self._copyRules(rules)
- self._doRun(resultEntry)
- filesAfter = self._getFileSet()
- self._clean(filesBefore, filesAfter)
+ try:
+ self._doRun(resultEntry)
+ finally:
+ filesAfter = self._getFileSet()
+ self._clean(filesBefore, filesAfter)
print
def _getFileSet(self):
testsRoot = os.path.dirname(os.path.abspath(__file__))
if not os.path.exists(os.path.join(testsRoot, "runtests.py")): raise "Can't find tests root directory!"
+os.environ['OMK_TESTSROOT'] = testsRoot
results = Results()
--- /dev/null
+# Generic directory or leaf node makefile for OCERA make framework
+
+ifndef MAKERULES_DIR
+MAKERULES_DIR := $(shell ( old_pwd="" ; while [ ! -e Makefile.rules ] ; do if [ "$$old_pwd" == `pwd` ] ; then exit 1 ; else old_pwd=`pwd` ; cd -L .. 2>/dev/null ; fi ; done ; pwd ) )
+endif
+
+ifeq ($(MAKERULES_DIR),)
+all : default
+.DEFAULT::
+ @echo -e "\nThe Makefile.rules has not been found in this or partent directory\n"
+else
+include $(MAKERULES_DIR)/Makefile.rules
+endif
+
--- /dev/null
+SUBDIRS = fibo-rtp fibo-rtplib #orte
--- /dev/null
+vxworks
\ No newline at end of file