[svn:parrot] r42836 - trunk/runtime/parrot/library

fperrad at svn.parrot.org fperrad at svn.parrot.org
Tue Dec 1 17:31:44 UTC 2009


Author: fperrad
Date: Tue Dec  1 17:31:43 2009
New Revision: 42836
URL: https://trac.parrot.org/parrot/changeset/42836

Log:
[distuils] add _clean_smoke

Modified:
   trunk/runtime/parrot/library/distutils.pir

Modified: trunk/runtime/parrot/library/distutils.pir
==============================================================================
--- trunk/runtime/parrot/library/distutils.pir	Tue Dec  1 16:58:56 2009	(r42835)
+++ trunk/runtime/parrot/library/distutils.pir	Tue Dec  1 17:31:43 2009	(r42836)
@@ -192,6 +192,8 @@
     register_step_after('clean', _clean_gztar)
     .const 'Sub' _clean_zip = '_clean_zip'
     register_step_after('clean', _clean_zip)
+    .const 'Sub' _clean_smoke = '_clean_smoke'
+    register_step_after('clean', _clean_smoke)
 
     .const 'Sub' _update = '_update'
     register_step('update', _update)
@@ -1702,6 +1704,12 @@
     die "Don't known how to smoke."
 .end
 
+.sub '_clean_smoke' :anon
+    .param pmc kv :slurpy :named
+    $S0 = get_prove_archive(kv :flat :named)
+    unlink($S0)
+.end
+
 =over 4
 
 =item prove_exec
@@ -1753,11 +1761,7 @@
     cmd .= $S0
     cmd .= " --archive="
     .local string archive
-    archive = "test.tar.gz" # default
-    $I0 = exists kv['prove_archive']
-    unless $I0 goto L4
-    archive = kv['prove_archive']
-  L4:
+    archive = get_prove_archive(kv :flat :named)
     cmd .= archive
     system(cmd)
 
@@ -3173,6 +3177,20 @@
     .return ($S0)
 .end
 
+=item get_prove_archive
+
+=cut
+
+.sub 'get_prove_archive'
+    .param string archive       :named('prove_archive') :optional
+    .param int has_archive      :opt_flag
+    .param pmc extra            :slurpy :named
+    unless has_archive goto L1
+    .return (archive)
+  L1:
+    .return ('test.tar.gz')
+.end
+
 =item get_version
 
 =cut


More information about the parrot-commits mailing list