| 1 | ////////////////////////////////////////////////////////////////////////////// |
|---|
| 2 | // FILE : tol_tester.tol |
|---|
| 3 | // PURPOSE : call all prepared tests about TOL features checking are binding |
|---|
| 4 | // to decide if a version should be published or not. |
|---|
| 5 | ////////////////////////////////////////////////////////////////////////////// |
|---|
| 6 | |
|---|
| 7 | Set Include("dbt.tol"); |
|---|
| 8 | |
|---|
| 9 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|---|
| 10 | //!!!!!!!!IMPORTANT NOTE: READ THIS THE FIRST TIME YOU RUN THIS FILE!!!!!!!!!! |
|---|
| 11 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|---|
| 12 | // |
|---|
| 13 | //All possible connections to allowed engines are stored in file |
|---|
| 14 | // dbt.engine.allowed.bst |
|---|
| 15 | //If not exists then Dbt.Engine.Allowed.Get(0) creates one with default |
|---|
| 16 | //values: |
|---|
| 17 | // |
|---|
| 18 | // database = "toltests"; |
|---|
| 19 | // user = "toltester"; |
|---|
| 20 | // password = "pwdtt"; |
|---|
| 21 | // host = |
|---|
| 22 | // "localhost" in all engines allowed for your operative system |
|---|
| 23 | // "<Other_OS_Name>_host" in all engines allowed for other operative systems |
|---|
| 24 | // |
|---|
| 25 | //You should ensure that default values is all you want to check or edit this |
|---|
| 26 | //file before run tests. |
|---|
| 27 | // |
|---|
| 28 | //The tester will use this set to try connections with all them that has the |
|---|
| 29 | //available_ field to 1. You should set 0 all items you canŽt access. |
|---|
| 30 | // |
|---|
| 31 | //Save a backup copy of the edited file to avoid accidental regeneration |
|---|
| 32 | //!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
|---|
| 33 | Set Dbt.Engine.Allowed = Dbt.Engine.Allowed.Get(0); |
|---|
| 34 | |
|---|
| 35 | //Ensuring what engines are ready in this moment |
|---|
| 36 | Set Dbt.Engine.Active = Dbt.Engine.Active.Update(0); |
|---|
| 37 | |
|---|
| 38 | Set EvalSet(Dbt.Engine.Active, Text(Set ci) |
|---|
| 39 | { |
|---|
| 40 | Real OSDirMake("by_engine/common"); |
|---|
| 41 | Real OSDirMake("by_engine/"+ci->engine_); |
|---|
| 42 | Text fileName = "by_engine/"+ci->engine_+"/"+ci->alias_+".tol"; |
|---|
| 43 | Text WriteFile(fileName, |
|---|
| 44 | "//////////////////////////////////////////////////////////////////////////////\n" |
|---|
| 45 | "//FILE : "+fileName+" \n" |
|---|
| 46 | "//PURPOSE : Connection to toltests database \n" |
|---|
| 47 | "//AUTHOR : Created automatically by toldb/_tolTester.tol \n" |
|---|
| 48 | "//////////////////////////////////////////////////////////////////////////////\n" |
|---|
| 49 | "\n" |
|---|
| 50 | "Set Include(\"../../dbt.tol\");\n" |
|---|
| 51 | "\n" |
|---|
| 52 | "Set Dbt.Connect = Dbt.Open(@Dbt.ConnectInfo\n" |
|---|
| 53 | "(\n" |
|---|
| 54 | " \""+ci->os_+"\",\n" |
|---|
| 55 | " \""+ci->engine_+"\",\n" |
|---|
| 56 | " \""+ci->driver_+"\",\n" |
|---|
| 57 | " \""+ci->database_+"\",\n" |
|---|
| 58 | " \""+ci->host_+"\",\n" |
|---|
| 59 | " \""+ci->port_+"\",\n" |
|---|
| 60 | " \""+ci->alias_+"\",\n" |
|---|
| 61 | " \""+ci->user_+"\",\n" |
|---|
| 62 | " \""+ci->password_+"\",\n" |
|---|
| 63 | " "+IntText(ci->available_)+"\n" |
|---|
| 64 | "));\n" |
|---|
| 65 | "\n"); |
|---|
| 66 | Real OSFilCopy(fileName,"by_engine/common/"+ci->alias_+".tol"); |
|---|
| 67 | fileName |
|---|
| 68 | }); |
|---|
| 69 | |
|---|
| 70 | Text Dbt.EngPath = Dbt.RootPath(0)+"by_engine/"; |
|---|
| 71 | Text Dbt.EngComPath = Dbt.EngPath+"common/"; |
|---|
| 72 | |
|---|
| 73 | /* */ |
|---|
| 74 | //Select the number of execution of each available test battery |
|---|
| 75 | //Obviously, deterministic tests should be executed just one time, but, |
|---|
| 76 | //probably, you want to run simulation tests a number of times on depending |
|---|
| 77 | //on the total time you can dedicate to this now. |
|---|
| 78 | //Also you can set 0 times to skype a battery |
|---|
| 79 | |
|---|
| 80 | Set Battery_1 = EvalSet(Dbt.Engine.Active,Set(Set ci) |
|---|
| 81 | { |
|---|
| 82 | @strBatteryConfig("by_engine/common", |
|---|
| 83 | Dbt.EngComPath+ci->alias_+".tol", |
|---|
| 84 | 1) |
|---|
| 85 | }); |
|---|
| 86 | |
|---|
| 87 | Set Battery_2 = EvalSet(Dbt.Engine.Active,Set(Set ci) |
|---|
| 88 | { |
|---|
| 89 | @strBatteryConfig("by_engine/"+ci->engine_, |
|---|
| 90 | Dbt.EngPath+ci->engine_+"/"+ci->alias_+".tol", |
|---|
| 91 | 1) |
|---|
| 92 | }); |
|---|
| 93 | |
|---|
| 94 | Set Results = ReportAllBatteries(Battery_1<<Battery_2); |
|---|
| 95 | |
|---|
| 96 | |
|---|
| 97 | /* */ |
|---|