changeset 882:534a591a0225

fixed report handling of complex test cases
author thomask
date Fri, 03 Mar 2006 11:56:48 +0000
parents 996d9134bf80
children e6e610efdba8
files Makefile complex/command_line/complex.mak complex/error_message/complex.mak complex/linking/complex.mak complex/typeinfo_init/complex.mak log.d update.sh
diffstat 7 files changed, 49 insertions(+), 118 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile	Thu Mar 02 19:02:58 2006 +0000
+++ b/Makefile	Fri Mar 03 11:56:48 2006 +0000
@@ -3,7 +3,7 @@
 # $Author$
 #
 # GnuMakefile for DStress http://dstress.kuehne.cn/www/dstress.html
-# Copyright (C) 2004, 2005 Thomas Kuehne
+# Copyright (C) 2004, 2005, 2006 Thomas Kuehne
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -165,15 +165,15 @@
 # used in some complex test cases
 define analyse_nocompile
 	@if $(ifeq__) $(z_return) 0 ; then \
-		$(ECHO) "XPASS: $(z_name)"; $(RM) $@; \
+		$(ECHO) "Torture-Sub-1/31-XPASS: $(z_name)"; $(RM) $@; \
 	else \
 		if $(CAT) $(z_log) | $(GREP) ; then \
-			$(ECHO) "ERROR: $(z_name) [Internal compiler error]"; $(RM) $@; \
+			$(ECHO) "Torture-Sub-1/31-ERROR: $(z_name) [Internal compiler error]"; $(RM) $@; \
 		else \
 			if $(ifeq__) $(z_return) 256 ; then \
-				$(ECHO) "XFAIL: $(z_name)"; $(TOUCH) $@; \
+				$(ECHO) "Torture-Sub-1/31-XFAIL: $(z_name)"; $(TOUCH) $@; \
 			else \
-				$(ECHO) "ERROR: $(z_name) [$(z_return)]"; $(RM) $@; \
+				$(ECHO) "Torture-Sub-1/31-ERROR: $(z_name) [$(z_return)]"; $(RM) $@; \
 			fi \
 		fi \
 	fi
@@ -193,12 +193,12 @@
 # used in some complex test cases
 define analyse_compile
 	@if $(ifeq__) $(z_return) 0 ; then \
-		$(ECHO) "PASS:  $(z_name)"; $(TOUCH) $@; \
+		$(ECHO) "Torture-Sub-1/31-PASS:  $(z_name)"; $(TOUCH) $@; \
 	else \
 		if $(ifeq__) $(z_return) 256 ; then \
-			$(ECHO) "FAIL:  $(z_name)"; $(RM) $@; \
+			$(ECHO) "Torture-Sub-1/31-FAIL:  $(z_name)"; $(RM) $@; \
 		else \
-			$(ECHO) "ERROR: $(z_name) [$(z_return)]"; $(RM) $@; \
+			$(ECHO) "Torture-Sub-1/31-ERROR: $(z_name) [$(z_return)]"; $(RM) $@; \
 		fi \
 	fi
 endef
@@ -220,19 +220,19 @@
 	@if $(ifeq__) $(z_return) 0 ; then \
 		$(eval z_return2 = $(shell $(return__) "./$@ $(to_log)")) \
 		if $(ifeq__) $(z_return2) 0 ; then \
-			$(ECHO) "PASS:  $(z_name)"; \
+			$(ECHO) "Torture-Sub-1/31-PASS:  $(z_name)"; \
 		else \
 			if $(ifeq__) $(z_return2) 256 ; then \
-				$(ECHO) "FAIL:  $(z_name)"; $(RM) $@; \
+				$(ECHO) "Torture-Sub-1/31-FAIL:  $(z_name)"; $(RM) $@; \
 			else \
-				$(ECHO) "ERROR: $(z_name) [run: $(z_return2)]"; $(RM) $@; \
+				$(ECHO) "Torture-Sub-1/31-ERROR: $(z_name) [run: $(z_return2)]"; $(RM) $@; \
 			fi \
 		fi \
 	else \
 		if $(ifeq__) $(z_return) 256 ; then \
-			$(ECHO) "FAIL:  $(z_name) (compiling error)"; \
+			$(ECHO) "Torture-Sub-1/31-FAIL:  $(z_name) (compiling error)"; \
 		else \
-			$(ECHO) "ERROR: $(z_name) [$(z_return)]"; \
+			$(ECHO) "Torture-Sub-1/31-ERROR: $(z_name) [$(z_return)]"; \
 		fi \
 	fi
 endef
@@ -287,15 +287,15 @@
 define analyse_norun
 	@if $(ifeq__) $(z_return) 0; then \
 		if ./$@ $(to_log); \
-			then $(ECHO) "XPASS: $(z_name)"; $(RM) $@; \
+			then $(ECHO) "Torture-Sub-1/31-XPASS: $(z_name)"; $(RM) $@; \
 		else \
-			$(ECHO) "XFAIL: $(z_name)"; \
+			$(ECHO) "Torture-Sub-1/31-XFAIL: $(z_name)"; \
 		fi \
 	else \
 		if $(ifeq__) $(z_return) 256 ; then \
-			$(ECHO) "FAIL:  $(z_name) (compiling error)"; $(RM) $@; \
+			$(ECHO) "Torture-Sub-1/31-FAIL:  $(z_name) (compiling error)"; $(RM) $@; \
 		else \
-			$(ECHO) "ERROR: $(z_name) [$(z_return)]"; \
+			$(ECHO) "Torture-Sub-1/31-ERROR: $(z_name) [$(z_return)]"; \
 		fi \
 	fi
 endef
--- a/complex/command_line/complex.mak	Thu Mar 02 19:02:58 2006 +0000
+++ b/complex/command_line/complex.mak	Fri Mar 03 11:56:48 2006 +0000
@@ -1,5 +1,5 @@
-# GnuMakefile for DStress http://dmd.kuehne.cn/dstress.html
-# Copyright (C) 2004 Thomas Kuehne
+# GnuMakefile for DStress http://dstress.kuehne.cn/www/dstress.html
+# Copyright (C) 2004, 2006 Thomas Kuehne
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -56,9 +56,9 @@
 	$(eval z_name = $(word 1,$(z_raw)))
 	$(eval z_arg = $(subst $(z_name),,$(z_raw)))
 	@if $(CD) complex/command_line ; $(DMD) $(z_arg) $(to_log); then \
-		$(ECHO) "XPASS: $(z_name)"; \
+		$(ECHO) "Torture-Sub-1/31-XPASS: $(z_name)"; \
 	else \
-		$(ECHO) "XFAIL: $(z_name)"; \
+		$(ECHO) "Torture-Sub-1/31-XFAIL: $(z_name)"; \
 	fi 
 	
 # this will be called by root's "clean" target
--- a/complex/error_message/complex.mak	Thu Mar 02 19:02:58 2006 +0000
+++ b/complex/error_message/complex.mak	Fri Mar 03 11:56:48 2006 +0000
@@ -1,5 +1,5 @@
-# GnuMakefile for DStress http://dmd.kuehne.cn/dstress.html
-# Copyright (C) 2004 Thomas Kuehne
+# GnuMakefile for DStress http://dstress.kuehne.cn/www/dstress.html
+# Copyright (C) 2004, 2006 Thomas Kuehne
 #
 # This program is free software; you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -49,9 +49,9 @@
 	$(eval z_name = $(word 2,$(z_raw)))
 	$(eval z_arg = $(subst __,,$(subst ,.d,$(z_name))))
 	@if $(CD) complex/error_message ; $(DMD) -c $(z_arg) | wc -l | grep "^[0-9][0-9][0-9]" $(to_log); then \
-		$(ECHO) "FAIL: $(z_name)"; \
+		$(ECHO) "Torture-Sub-1/31-FAIL: complex/error_message/$(z_name)"; \
 	else \
-		$(ECHO) "PASS: $(z_name)"; \
+		$(ECHO) "Torture-Sub-1/31-PASS: complex/error_message/$(z_name)"; \
 	fi 
 	
 # this will be called by root's "clean" target
--- a/complex/linking/complex.mak	Thu Mar 02 19:02:58 2006 +0000
+++ b/complex/linking/complex.mak	Fri Mar 03 11:56:48 2006 +0000
@@ -1,4 +1,4 @@
-# GnuMakefile for DStress http://dmd.kuehne.cn/dstress.html
+# GnuMakefile for DStress http://dstress.kuehne.cn/www/dstres.html
 # Copyright (C) 2004 Thomas Kuehne
 #
 # This program is free software; you can redistribute it and/or modify
--- a/complex/typeinfo_init/complex.mak	Thu Mar 02 19:02:58 2006 +0000
+++ b/complex/typeinfo_init/complex.mak	Fri Mar 03 11:56:48 2006 +0000
@@ -1,4 +1,4 @@
-# GnuMakefile for DStress http://dmd.kuehne.cn/dstress.html
+# GnuMakefile for DStress http://dstress.kuehne.cn/www/dstress.html
 # Copyright (C) 2004 Thomas Kuehne
 #
 # This program is free software; you can redistribute it and/or modify
--- a/log.d	Thu Mar 02 19:02:58 2006 +0000
+++ b/log.d	Fri Mar 03 11:56:48 2006 +0000
@@ -218,19 +218,6 @@
 	}
 }
 
-class PlainTest : Test{
-	Result r;
-
-	Result condensed(){
-		return r;
-	}
-
-	this(char[] file, Result result){
-		super(file);
-		r = result;
-	}
-}
-
 class TortureTest : Test{
 	Result[] r;
 
@@ -261,7 +248,6 @@
 }
 
 class Log{
-	PlainTest[char[]] plain;
 	TortureTest[char[]] torture;
 
 	char[] id;
@@ -309,23 +295,6 @@
 	Regression[] findRegressions(Log oldLog){
 		Regression[] back;
 		
-		foreach(PlainTest t; plain.values){
-			PlainTest* oldT = t.file in oldLog.plain;
-			if(oldT !is null){
-				if(oldT.r < t.r){
-					back ~= new Regression(oldT.r, t);
-				}
-			}else{
-				TortureTest* oldT = t.file in oldLog.torture;
-				if(oldT !is null){
-					Result r = oldT.condensed();
-					if(r < t.r){
-						back ~= new Regression(r, t);
-					}
-				}
-			}
-		}
-
 		foreach(TortureTest t; torture.values){
 			TortureTest* oldT = t.file in oldLog.torture;
 
@@ -335,14 +304,6 @@
 						back ~= new Regression(t.name, t.file, oldT.r[i], r, TORTURE_FLAGS[i]); 
 					}
 				}
-			}else{
-				PlainTest* oldT = t.file in oldLog.plain;
-				if(oldT !is null){
-					Result r = t.condensed();
-					if(oldT.r < r){
-						back ~= new Regression(t.name, t.file, oldT.r, r);
-					}
-				}
 			}
 		}
 
@@ -363,7 +324,7 @@
 				}
 			}else if(isfile(path)){
 				char[] file = path[testRoot.length + std.path.sep.length .. $];
-				if(!(file in plain) && !(file in torture)){
+				if(!(file in torture)){
 					char[] output = "dstress torture-" ~ status ~ " " ~ file;
 					updateList ~= output;
 				}
@@ -379,39 +340,26 @@
 	}
 
 	void dropBogusResults(FStime recordTime, char[] testRoot){
-		uint totalCount = plain.length + torture.length; 
-
-		char[][] sourcesPlain = plain.keys;
-		foreach(char[] source; sourcesPlain){
-			try{
-				FStime caseTime = getFStime(testRoot~std.path.sep~source);
-				if(caseTime > recordTime){
-					debug(drop) fwritefln(stderr, "dropped: %s", source);
-					plain.remove(source);
-				}
-			}catch(Exception e){
-				debug(drop) fwritefln(stderr, "dropped: %s", source);
-				plain.remove(source);
-			}
-		}
-		plain.rehash;
+		uint totalCount = torture.length; 
 		
 		char[][] sourcesTorture = torture.keys;
 		foreach(char[] source; sourcesTorture){
-			try{
-				FStime caseTime = getFStime(testRoot~std.path.sep~source);
-				if(caseTime > recordTime){
+			if(-1 == find(source, "complex/")){
+				try{
+					FStime caseTime = getFStime(testRoot~std.path.sep~source);
+					if(caseTime > recordTime){
+						debug(drop) fwritefln(stderr, "dropped: %s", source);
+						torture.remove(source);
+					}
+				}catch(Exception e){
 					debug(drop) fwritefln(stderr, "dropped: %s", source);
 					torture.remove(source);
 				}
-			}catch(Exception e){
-				debug(drop) fwritefln(stderr, "dropped: %s", source);
-				torture.remove(source);
 			}
 		}
 		torture.rehash;
 		
-		writefln("dropped %s outdated tests (%s remaining)", totalCount - (plain.length + torture.length), plain.length + torture.length); 
+		writefln("dropped %s outdated tests (%s remaining)", totalCount - torture.length, torture.length); 
 	}
 
 	
@@ -474,30 +422,13 @@
 			
 			file = cleanFileName(file);
 			
-			if(id < 0){
-				// update plain
-				PlainTest* test  = file in plain;
-		
-				if(test is null){
-					if((file in torture) !is null){
-						torture.remove(file);
-					}
-
-					plain[file] = new PlainTest(file, r);
-				}else{
-					test.r = r;
-				}
-			}else{
+			if(id >= 0){
 				// update sub
 				id--;
 		
 				TortureTest* test = file in torture;
 
 				if(test is null){
-					if((file in plain) !is null){
-						plain.remove(file);
-					}
-
 					TortureTest t = new TortureTest(file);
 					torture[file] = t;
 					t.r[id] = r;
@@ -521,13 +452,6 @@
 	char[] name;
 	char[] extInfo;
 
-	this(Result oldResult, PlainTest b){
-		before = oldResult;
-		after = b.r;
-		file = b.file;
-		name = b.name;
-	}
-
 	this(char[] name, char[] file, Result oldR, Result newR, char[] addonInfo=null){
 		this.file = file;
 		this.name = name;
@@ -699,7 +623,11 @@
 					continue;
 				}else{
 					char[] name = replace(t.name, "_", " ");
-					char[] back = "<tr><th><a href=\"../"~t.file~"\" id='"~t.name~"'>"~name~"</a></th>";
+					char[] src = t.file;
+					if(find(src,"complex/")!=-1){
+						src = src[0 .. rfind(src, "/")];
+					}
+					char[] back = "<tr><th><a href=\"../"~src~"\" id='"~t.name~"'>"~name~"</a></th>";
 					foreach(Result r; t.r){
 						back ~= "<td class='" ~ cast(char)(r+'A') ~ "'>";
 						if(r == Result.UNTESTED){
@@ -931,7 +859,7 @@
 		case "genUpdateList":{
 			foreach(Log l; report.log){
 				char[][] update = l.genUpdateList(root);
-				writefln("%s updates required (%s still up to date)", update.length, l.plain.length + l.torture.length);
+				writefln("%s updates required (%s still up to date)", update.length, l.torture.length);
 
 				char[] updateFile = l.id ~ ".update";
 				try{std.file.remove(updateFile);}catch{}
--- a/update.sh	Thu Mar 02 19:02:58 2006 +0000
+++ b/update.sh	Fri Mar 03 11:56:48 2006 +0000
@@ -1,7 +1,7 @@
 #!/bin/bash
 
 make distclean
-dmd -w -O log.d || exit
+dmd -w -O log.d || exit 2
 export PATH=.:$PATH
 
 for DMD in `cd /opt/dmd/bin/; ls *dmd-0.*  | sort -u -r`; do
@@ -25,6 +25,9 @@
 		mv raw_results/linux-amd64_$DMDX.log.update update-list.sh
 		chmod +x update-list.sh
 		./update-list.sh >> raw_results/linux-amd64_$DMDX 2>> raw_results/linux-amd64_$DMDX.log
+		rm -f log.txt
+		make complex > log.txt 2>&1
+		cat log.txt >> raw_results/linux-amd64_$DMDX.log
 	else
 		echo "$DMD ($DMDX) - full build"
 		make > raw_results/linux-amd64_$DMDX 2>&1