Details
Description
Attached the discussion on IRC
<ralf>
-don't yell at me if i mention test now but it has nothing to do with executing tests
-do you have the source at hand
-have a look at src/tests/jdo/BatchUpdateSQL
-that's a class to execute the sql scripts to set up the tables for the test cases
-as i am refectroing the test cases i put test classes, classes of test objects and mappings for them into subdirectories
-what is missing is the possibility to also put the sql scripts into these subdirectories
-but there is one problem with doing that
-if you want to setup the test tables you need to execute all the scripts in all these subdiretories by hand
-or put a sql script that includes them all into the parent directory
-but some of the databases (e.g. mysql) don't allow that as e.g. orcale does with @xyz.sql.
-my idea is to extend the BatchUpdateSQL class to manage this
-what do you think about it
<emir>
-i'm reading...
-(don;t have source here)
-is there still webcvs
-for castor
<ralf>
-http://cvs.castor.codehaus.org/viewrep/~raw,r=1.5/castor/castor/src/tests/jdo/BatchUpdateSQL.java
<emir>
-so...
-what's your idea how to do this
-do i need to test on mysql...
<ralf>
-you don't need to test on mysql
-the idea is to introduce some special tags into the sql scripts
every database allows comment lines e.g. '- comment'
<emir>
-ok so we should put tags in comment lines
-and these tags will help us to...
<ralf>
i'd like to use something like '@path-the-script-to-be-included' e.g. '-@../ctf/jdo/tc1x/mysql.sql'
<emir>
-and how will i run the script... open it and execute line by line?
<ralf>
-parsing the file with BatchUpdateSQL should recognize that lines and inlude the files
Ralf,
I hope I'll fix this soon.
I just didn't have time for castor last few months...