[Treepkg-commits] r108 - trunk/test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Jun 25 17:14:27 CEST 2008


Author: bh
Date: 2008-06-25 17:14:27 +0200 (Wed, 25 Jun 2008)
New Revision: 108

Modified:
   trunk/test/test_builder.py
Log:
Add test case for the save_after_exec parameter and adapt the other
PBuilder.run_script tests to a change introduced in the last commit.


Modified: trunk/test/test_builder.py
===================================================================
--- trunk/test/test_builder.py	2008-06-25 15:09:06 UTC (rev 107)
+++ trunk/test/test_builder.py	2008-06-25 15:14:27 UTC (rev 108)
@@ -244,7 +244,7 @@
         builder.run_script(["my_script"], logfile="the_logfile")
         self.check_command_line(['/usr/sbin/pbuilder', 'execute',
                                  '--configfile', 'my_pbuilderrc',
-                                 '--logfile', 'the_logfile',
+                                 '--logfile', 'the_logfile', '--',
                                  'my_script'])
 
     def test_run_script_with_arguments(self):
@@ -252,7 +252,7 @@
         builder.run_script(["my_script", "--verbose"], logfile="the_logfile")
         self.check_command_line(['/usr/sbin/pbuilder', 'execute',
                                  '--configfile', 'my_pbuilderrc',
-                                 '--logfile', 'the_logfile',
+                                 '--logfile', 'the_logfile', '--',
                                  'my_script', '--verbose'])
 
     def test_run_script_with_bindmounts(self):
@@ -265,9 +265,19 @@
                                  '--logfile', 'the_logfile',
                                  '--bindmounts', '/home/builder/foo',
                                  '--bindmounts', '/home/builder/treepkg',
-                                 'my_script'])
+                                 '--', 'my_script'])
 
+    def test_run_script_save_after_exec(self):
+        builder = PBuilder("my_pbuilderrc", self.root_command)
+        builder.run_script(["my_script", "--verbose"], logfile="the_logfile",
+                           save_after_exec=True)
+        self.check_command_line(['/usr/sbin/pbuilder', 'execute',
+                                 '--configfile', 'my_pbuilderrc',
+                                 '--logfile', 'the_logfile',
+                                 '--save-after-exec', '--',
+                                 'my_script', '--verbose'])
 
+
 class TestPBuilderWithBinaryPackage(PBuilderTests):
 
     minimal_package = [



More information about the Treepkg-commits mailing list