* support/regression/collate-results.py: fixed output in case of a valdiag error
authorbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 15 Apr 2006 20:54:19 +0000 (20:54 +0000)
committerbernhardheld <bernhardheld@4a8a32a2-be11-0410-ad9d-d568d2c75423>
Sat, 15 Apr 2006 20:54:19 +0000 (20:54 +0000)
* support/regression/generate-cases.py: fixed splitting of pathnames with dots
* as/hc08/lklibr.c,
* as/mcs51/lklibr.c (addfile): fixed off-by-one bug

git-svn-id: https://sdcc.svn.sourceforge.net/svnroot/sdcc/trunk/sdcc@4094 4a8a32a2-be11-0410-ad9d-d568d2c75423

ChangeLog
as/hc08/lklibr.c
as/mcs51/lklibr.c
support/regression/collate-results.py
support/regression/generate-cases.py

index 26dde108184b66ffc617563d96602e381b193b60..ce6ce2a3307d2b6c68d04882c6af4eb8fdb0eba7 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,12 @@
+2006-04-15 Bernhard Held <bernhard AT bernhardheld.de>
+
+       * support/regression/collate-results.py: fixed output in case of
+       a valdiag error
+       * support/regression/generate-cases.py: fixed splitting of pathnames
+       with dots
+       * as/hc08/lklibr.c (addfile),
+       * as/mcs51/lklibr.c (addfile): fixed off-by-one bug
+
 2006-04-11 Raphael Neider <rneider AT web.de>
 
        * src/pic16/gen.c (getFreePtr, pic16_popRegFromString),
index 74c8c361b251dfa16bff3a32e91d4215f732b912..eb33beafd1c498e6ba64f928f0fa5c1767db785a 100644 (file)
@@ -237,7 +237,7 @@ int addfile(char * path, char * libfil)
         That way putting 'path' and 'libfil' together will result into the original filepath
         as contained in 'str'.*/
         int j;
-        path = (char *) new (strlen(str));
+        path = (char *) new (strlen(str) + 1);
         strcpy(path, str);
         for(j=strlen(path)-1; j>=0; j--)
         {
index c08b8580d22c4e46274831c27c04088a2b5e3144..bb7218f886a8bf56fd348e5f9b3525bba1bd8101 100644 (file)
@@ -267,7 +267,7 @@ int addfile(char * path, char * libfil)
         That way putting 'path' and 'libfil' together will result into the original filepath
         as contained in 'str'.*/
         int j;
-        path = (char *) new (strlen(str));
+        path = (char *) new (strlen(str) + 1);
         strcpy(path, str);
         for(j=strlen(path)-1; j>=0; j--)
         {
index 03f891a74ba15bb37db360c6b60fcf93032b43b2..e58a981e73133d5b0abd9fed19371b34005de4bf 100644 (file)
@@ -15,6 +15,9 @@ tests = 0
 bytes = 0
 ticks = 0
 
+# hack for valdiag
+name = ""
+
 for line in lines:
     if (re.search(r'^--- Running', line)):
         name = line
index 81ebe8daaf96e21138ff428a3e40228430a18703..9c9bb04585ce5dc122a0f9aff0970e74531bf45f 100644 (file)
@@ -68,8 +68,8 @@ class InstanceGenerator:
         self.functions = []
         # Emit the suite wrapper into a temporary file
         self.tmpname = tempfile.mktemp()
-        (self.basename, self.ext) = re.split(r'\.', self.inname)
-        self.ext = '.' + self.ext
+        (self.dirname, self.filename) = os.path.split(self.inname)
+        (self.basename, self.ext) = os.path.splitext (self.filename)
 
     def permute(self, basepath, keys, trans = {}):
         """Permutes across all of the names.  For each value, recursivly creates
@@ -171,7 +171,7 @@ class InstanceGenerator:
         createdir(outdir)
 
         # Generate
-        self.permute(os.path.join(outdir, os.path.basename(self.basename)), self.replacements.keys())
+        self.permute(os.path.join(outdir, self.basename), self.replacements.keys())
 
         # Remove the temporary file
         os.remove(self.tmpname)