* Updated script te create testsuite-database

git-svn-id: trunk@9921 -
This commit is contained in:
joost 2008-01-26 12:24:15 +00:00
parent 0e0fbee1cd
commit 9e2e350d08

View File

@ -1,88 +1,138 @@
SET SQL_MODE="NO_AUTO_VALUE_ON_ZERO";
CREATE TABLE TESTS (
T_ID INTEGER NOT NULL AUTO_INCREMENT,
T_NAME VARCHAR(80) NOT NULL,
T_FULLNAME VARCHAR(255) NOT NULL,
T_CPU VARCHAR(20),
T_OS VARCHAR(30),
T_VERSION VARCHAR(10),
T_ADDDATE DATE NOT NULL,
T_GRAPH CHAR(1) NOT NULL DEFAULT '-',
T_INTERACTIVE CHAR(1) NOT NULL DEFAULT '-',
T_RESULT INTEGER NOT NULL DEFAULT 0,
T_FAIL CHAR(1) NOT NULL DEFAULT '-',
T_RECOMPILE CHAR(1) NOT NULL DEFAULT '-',
T_NORUN CHAR(1) NOT NULL DEFAULT '-',
T_NEEDLIBRARY CHAR(1) NOT NULL DEFAULT '-',
T_KNOWNRUNERROR INTEGER NOT NULL DEFAULT 0,
T_KNOWN CHAR(1) NOT NULL DEFAULT '-',
T_NOTE VARCHAR(255),
T_DESCRIPTION TEXT,
T_SOURCE TEXT,
T_OPTS VARCHAR(255),
UNIQUE TESTNAME (T_NAME),
PRIMARY KEY PK_TEST (T_ID)
T_ID int(11) NOT NULL auto_increment,
T_NAME varchar(40) default NULL,
T_CPU varchar(20) default NULL,
T_OS varchar(30) default NULL,
T_VERSION varchar(10) default NULL,
T_ADDDATE date NOT NULL default '0000-00-00',
T_GRAPH char(1) NOT NULL default '-',
T_INTERACTIVE char(1) NOT NULL default '-',
T_RESULT int(11) NOT NULL default '0',
T_FAIL char(1) NOT NULL default '-',
T_RECOMPILE char(1) NOT NULL default '-',
T_NORUN char(1) NOT NULL default '-',
T_NEEDLIBRARY char(1) NOT NULL default '-',
T_KNOWNRUNERROR int(11) NOT NULL default '0',
T_KNOWN char(1) NOT NULL default '-',
T_NOTE varchar(255) default NULL,
T_DESCRIPTION text,
T_SOURCE text,
T_OPTS varchar(255) default NULL,
PRIMARY KEY (T_ID),
UNIQUE KEY T_NAME (T_NAME)
);
CREATE TABLE TESTRESULTS (
TR_ID INTEGER NOT NULL AUTO_INCREMENT,
TR_TEST_FK INTEGER NOT NULL,
TR_DATE TIMESTAMP NOT NULL,
TR_CPU_FK INTEGER,
TR_OS_FK INTEGER,
TR_VERSION_FK INTEGER,
TR_OK CHAR(1) NOT NULL DEFAULT '-',
TR_SKIP CHAR(1) NOT NULL DEFAULT '-',
TR_RESULT INT NOT NULL DEFAULT 0,
TR_LOG TEXT,
PRIMARY KEY (TR_ID),
INDEX TR_IDATE (TR_DATE)
TR_ID int(11) NOT NULL auto_increment,
TR_TESTRUN_FK int(11) NOT NULL default '0',
TR_TEST_FK int(11) default NULL,
TR_OK char(1) NOT NULL default '-',
TR_SKIP char(1) NOT NULL default '-',
TR_RESULT int(11) NOT NULL default '0',
TR_LOG text,
PRIMARY KEY (TR_ID),
UNIQUE KEY TR_TESTCOMP (TR_TESTRUN_FK,TR_TEST_FK),
KEY I_TRTESTRUN (TR_TESTRUN_FK),
KEY I_TRTEST (TR_TEST_FK)
);
CREATE TABLE TESTRUN (
TU_ID int(11) NOT NULL auto_increment,
TU_DATE timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
TU_CPU_FK int(11) NOT NULL default '0',
TU_OS_FK int(11) NOT NULL default '0',
TU_VERSION_FK int(11) NOT NULL default '0',
TU_CATEGORY_FK int(11) NOT NULL default '1',
TU_FAILEDTOCOMPILE int(11) NOT NULL default '0',
TU_SUCCESSFULLYFAILED int(11) NOT NULL default '0',
TU_FAILEDTOFAIL int(11) NOT NULL default '0',
TU_SUCCESFULLYCOMPILED int(11) NOT NULL default '0',
TU_FAILEDTORUN int(11) NOT NULL default '0',
TU_KNOWNPROBLEM int(11) NOT NULL default '0',
TU_SUCCESSFULLYRUN int(11) NOT NULL default '0',
TU_SKIPPEDGRAPHTEST int(11) NOT NULL default '0',
TU_SKIPPEDINTERACTIVETEST int(11) NOT NULL default '0',
TU_KNOWNBUG int(11) NOT NULL default '0',
TU_COMPILERVERIONTOOLOW int(11) NOT NULL default '0',
TU_COMPILERVERIONTOOHIGH int(11) NOT NULL default '0',
TU_OTHERCPU int(11) NOT NULL default '0',
TU_OTHERTARGET int(11) NOT NULL default '0',
TU_UNIT int(11) NOT NULL default '0',
TU_SKIPPINGRUNTEST int(11) NOT NULL default '0',
TU_SUBMITTER varchar(128) NOT NULL default '',
TU_MACHINE varchar(128) NOT NULL default '',
TU_COMMENT varchar(255) NOT NULL default '',
PRIMARY KEY (TU_ID),
UNIQUE KEY TU_OVERVIEW (TU_ID,TU_CPU_FK,TU_OS_FK,TU_VERSION_FK,TU_DATE),
KEY TU_IDATE (TU_DATE)
);
CREATE TABLE `TESTCATEGORY` (
TCAT_ID int(11) NOT NULL auto_increment,
TCAT_NAME varchar(20) default NULL,
PRIMARY KEY (`TCAT_ID`),
UNIQUE KEY `TCAT_NAME` (`TCAT_NAME`)
) AUTO_INCREMENT=3 ;
CREATE TABLE TESTOS (
TO_ID INTEGER NOT NULL AUTO_INCREMENT,
TO_NAME VARCHAR(10),
PRIMARY KEY (TO_ID),
UNIQUE TR_INAME (TO_NAME)
);
TO_ID int(11) NOT NULL auto_increment,
TO_NAME varchar(10) default NULL,
PRIMARY KEY (`TO_ID`),
UNIQUE KEY `TR_INAME` (`TO_NAME`)
) AUTO_INCREMENT=18 ;
CREATE TABLE TESTVERSION (
TV_ID INTEGER NOT NULL AUTO_INCREMENT,
TV_VERSION VARCHAR(10),
TV_RELEASEDATE TIMESTAMP,
PRIMARY KEY (TV_ID),
UNIQUE TR_INAME (TV_VERSION)
);
TV_ID int(11) NOT NULL auto_increment,
TV_VERSION varchar(10) default NULL,
TV_RELEASEDATE timestamp NOT NULL default CURRENT_TIMESTAMP on update CURRENT_TIMESTAMP,
PRIMARY KEY (TV_ID),
UNIQUE KEY TR_INAME (TV_VERSION)
) AUTO_INCREMENT=7;
CREATE TABLE TESTCPU (
TC_ID INTEGER NOT NULL AUTO_INCREMENT,
TC_NAME VARCHAR(10),
PRIMARY KEY (TC_ID),
UNIQUE TC_INAME (TC_NAME)
);
TC_ID int(11) NOT NULL auto_increment,
TC_NAME varchar(10) default NULL,
PRIMARY KEY (TC_ID),
UNIQUE KEY TC_INAME (TC_NAME)
) AUTO_INCREMENT=10 ;
INSERT INTO TESTOS (TO_NAME) VALUES ('linux');
INSERT INTO TESTOS (TO_NAME) VALUES ('win32');
INSERT INTO TESTOS (TO_NAME) VALUES ('go32v2');
INSERT INTO TESTOS (TO_NAME) VALUES ('os2');
INSERT INTO TESTOS (TO_NAME) VALUES ('freebsd');
INSERT INTO TESTOS (TO_NAME) VALUES ('netbsd');
INSERT INTO TESTOS (TO_NAME) VALUES ('openbsd');
INSERT INTO TESTOS (TO_NAME) VALUES ('amiga');
INSERT INTO TESTOS (TO_NAME) VALUES ('atari');
INSERT INTO TESTOS (TO_NAME) VALUES ('qnx');
INSERT INTO TESTOS (TO_NAME) VALUES ('beos');
INSERT INTO TESTOS (TO_NAME) VALUES ('sunos');
INSERT INTO TESTCATEGORY VALUES (1, 'Compiler/RTL');
INSERT INTO TESTCATEGORY VALUES (2, 'DB');
INSERT INTO TESTCPU (TC_NAME) VALUES ('i386');
INSERT INTO TESTCPU (TC_NAME) VALUES ('ppc');
INSERT INTO TESTCPU (TC_NAME) VALUES ('m68k');
INSERT INTO TESTCPU (TC_NAME) VALUES ('sparc');
INSERT INTO TESTCPU VALUES (1, 'i386');
INSERT INTO TESTCPU VALUES (6, 'arm');
INSERT INTO TESTCPU VALUES (3, 'm68k');
INSERT INTO TESTCPU VALUES (4, 'sparc');
INSERT INTO TESTCPU VALUES (5, 'powerpc');
INSERT INTO TESTCPU VALUES (7, 'x86_64');
INSERT INTO TESTCPU VALUES (8, 'All');
INSERT INTO TESTCPU VALUES (9, 'powerpc64');
INSERT INTO TESTVERSION (TV_VERSION) VALUES ('1.0.6');
INSERT INTO TESTVERSION (TV_VERSION) VALUES ('1.0.7');
INSERT INTO TESTVERSION (TV_VERSION) VALUES ('1.0.8');
INSERT INTO TESTVERSION (TV_VERSION) VALUES ('1.1.0');
INSERT INTO TESTVERSION (TV_VERSION) VALUES ('1.1');
INSERT INTO TESTOS VALUES (1, 'linux');
INSERT INTO TESTOS VALUES (2, 'win32');
INSERT INTO TESTOS VALUES (3, 'go32v2');
INSERT INTO TESTOS VALUES (4, 'os2');
INSERT INTO TESTOS VALUES (5, 'freebsd');
INSERT INTO TESTOS VALUES (6, 'netbsd');
INSERT INTO TESTOS VALUES (7, 'openbsd');
INSERT INTO TESTOS VALUES (8, 'amiga');
INSERT INTO TESTOS VALUES (9, 'atari');
INSERT INTO TESTOS VALUES (10, 'qnx');
INSERT INTO TESTOS VALUES (11, 'beos');
INSERT INTO TESTOS VALUES (12, 'solaris');
INSERT INTO TESTOS VALUES (13, 'darwin');
INSERT INTO TESTOS VALUES (14, 'macos');
INSERT INTO TESTOS VALUES (15, 'All');
INSERT INTO TESTOS VALUES (16, 'win64');
INSERT INTO TESTOS VALUES (17, 'wince');
INSERT INTO TESTVERSION VALUES (1, '2.0.4', '2006-08-22 22:38:20');
INSERT INTO TESTVERSION VALUES (2, '2.0.5', '2006-08-22 22:38:20');
INSERT INTO TESTVERSION VALUES (3, '2.3.1', '2007-03-04 23:40:07');
INSERT INTO TESTVERSION VALUES (4, '2.1.2', '2007-03-19 10:49:30');
INSERT INTO TESTVERSION VALUES (5, '2.1.3', '2007-03-19 10:49:47');
INSERT INTO TESTVERSION VALUES (6, '2.1.4', '2007-03-19 10:50:03');