Skip to content
This repository
Browse code

target install added

  • Loading branch information...
commit 4841027e8eb2ed0c29642edcb0be97c0c8c4b819 1 parent 602e40f
authored November 02, 2011

Showing 1 changed file with 35 additions and 32 deletions. Show diff stats Hide diff stats

  1. 67  setup.winxed
67  setup.winxed
@@ -31,7 +31,7 @@ function main[main](argv) {
31 31
     "doc_files"         : 'README.rdoc',
32 32
     "manifest_includes" : ["README.rdoc", "setup.winxed"]
33 33
   };
34  
-  var required = { "parrot" : "3.8.0", "winxed" : '1.2.0' };
  34
+  var requirement = { "parrot" : "3.8.0", "winxed" : '1.2.0' };
35 35
   var config = getinterp()[IGLOBALS_CONFIG_HASH];
36 36
 
37 37
   // test option: ex) test array
@@ -42,11 +42,10 @@ function main[main](argv) {
42 42
 
43 43
   ${ set_global 'cardinal', cardinal };
44 44
   ${ set_global 'config', config };
45  
-  ${ set_global 'required', required };
  45
+  ${ set_global 'requirement', requirement };
46 46
 
47 47
   // register steps
48 48
   register_step("__build", __build);
49  
-  register_step("smoke", __smoke);
50 49
   register_step("__test", __test);
51 50
 
52 51
   register_step_before("__build", __check_dependencies);
@@ -55,8 +54,8 @@ function main[main](argv) {
55 54
   register_step_before("clean", __clean);
56 55
   register_step_before("__test", __check_dependencies);
57 56
   register_step_before("test", __test);
58  
-  register_step_before("smoke", __check_dependencies);
59  
-  register_step_before("install", __install);
  57
+  register_step_before("smoke", __smoke);
  58
+  register_step_before("install", __build);
60 59
   register_step_after("help", __help);
61 60
 
62 61
   argv.shift();
@@ -66,23 +65,19 @@ function main[main](argv) {
66 65
 // before steps
67 66
 function __check_dependencies() {
68 67
   var config;
69  
-  var required;
  68
+  var requirement;
70 69
   ${ get_global config, 'config'};
71  
-  ${ get_global required, 'required'};
  70
+  ${ get_global requirement, 'requirement'};
72 71
 
73  
-  var req = split('.', required['parrot']);
  72
+  var req = split('.', requirement['parrot']);
74 73
   var sys = split('.', config['VERSION']);
75 74
 
76 75
   if( (req[0] > sys[0]) || (req[1] > sys[1]) || (req[2] > sys[2]) ) {
77  
-    // bug?
78  
-    // string msg = '' + required['parrot'];
79  
-    // msg is expected 3.3.0 but was 3
80  
-
81 76
     say("BUILD FAILED");
82 77
     say("===================================================");
83 78
     say("Your Parrot is older version than Cardinal requires");
84 79
     print("Please upgrade to Parrot-");
85  
-    say(required['parrot']);
  80
+    say(requirement['parrot']);
86 81
     say("");
87 82
     say("See parrot download page for more details:");
88 83
     say("  http://parrot.org/download");
@@ -179,7 +174,8 @@ function __test() {
179 174
   ${ get_global test_opt, 'test_target' };
180 175
 
181 176
   string command = './installable_cardinal ';
182  
-  var files = {};
  177
+  var files = {
  178
+  };
183 179
   files['general'] = glob('t/*.t');
184 180
   files['array']   = glob('t/array/*.t');
185 181
   files['file']    = glob('t/file/*.t');
@@ -195,17 +191,22 @@ function __test() {
195 191
     target = { 'opt' : files[test_opt] };
196 192
   } else {
197 193
     target = files;
  194
+    //var t = glob('t/');
  195
+    //for (string f in t) {
  196
+    //  say(f);
  197
+    //}
  198
+    //${ exit 0 };
198 199
   }
199 200
 
200 201
   // TODO: dirty!
201 202
   // run tests
202 203
   for (string key in target) {
203  
-      for (string file in target[key]) {
204  
-        //${ runtests file :flat, command :named('exec') };
205  
-        int result = 0;
206  
-        string exe = command + file;
207  
-        say(exe);
208  
-        ${ spawnw result, exe };
  204
+    for (string file in target[key]) {
  205
+      //${ runtests file :flat, command :named('exec') };
  206
+      int result = 0;
  207
+      string exe = command + file;
  208
+      say(exe);
  209
+      ${ spawnw result, exe };
209 210
     }
210 211
   }
211 212
 
@@ -214,19 +215,21 @@ function __test() {
214 215
 
215 216
 function __smoke() {
216 217
   var config;
  218
+  var cardinal;
217 219
   var smoke_extra = {};
218 220
 
219 221
   ${ get_global config, 'config'};
  222
+  ${ get_global cardinal, 'cardinal'};
220 223
 
221 224
   smoke_extra['Architecture']    = config['archname'];
222 225
   smoke_extra['Platform']        = config['osname'];
223 226
   smoke_extra['Parrot Revision'] = config['revision'];
224  
-  //smoke_extra['Submitter'] = get_submitter();
  227
+  //smoke_extra['Submitter']       = '';
225 228
 
226  
-  config['smolder_extra_properties'] = smoke_extra;
227  
-  //config['smolder_tags'] = ${get_tags()};
228  
-  config['prove_archive']  = 'report.tar.gz';
229  
-  config['smolder_url']    = 'http://smolder.parrot.org/app/projects/process_add_report/10';
  229
+  cardinal['smolder_extra_properties'] = smoke_extra;
  230
+  cardinal['smolder_tags']   = config['osname'] + ', ' + config['archname'];
  231
+  cardinal['prove_archive']  = 'report.tar.gz';
  232
+  cardinal['smolder_url']    = 'http://smolder.parrot.org/app/projects/process_add_report/10';
230 233
 }
231 234
 
232 235
 function __install() {
@@ -234,16 +237,16 @@ function __install() {
234 237
 }
235 238
 
236 239
 function __help() {
237  
-  var required;
238  
-  ${ get_global required, 'required'};
  240
+  var requirement;
  241
+  ${ get_global requirement, 'requirement'};
239 242
 
240  
-  string parrot = required['parrot'];
241  
-  string winxed = required['winxed'];
  243
+  string parrot = requirement['parrot'];
  244
+  string winxed = requirement['winxed'];
242 245
 
243 246
   say(
244 247
     "\t"   + "smoke:\t\tReport smoke test." + "\n\n" +
245  
-    "    " + "Requirements:"  + "\n\n" +
246  
-    "\t"   + "parrot: "       + "\t"   + parrot + "\n\n" +
247  
-    "\t"   + "winxed: "       + "\t"   + winxed
  248
+    "    " + "Requirements:"                + "\n\n" +
  249
+    "\t"   + "parrot: "                     + "\t"   + parrot + "\n\n" +
  250
+    "\t"   + "winxed: "                     + "\t"   + winxed
248 251
   );
249 252
 }

0 notes on commit 4841027

Please sign in to comment.
Something went wrong with that request. Please try again.