s4-test: added --rebase and --clean options
authorAndrew Tridgell <tridge@samba.org>
Thu, 18 Nov 2010 04:27:45 +0000 (15:27 +1100)
committerAndrew Tridgell <tridge@samba.org>
Thu, 18 Nov 2010 22:12:26 +0000 (23:12 +0100)
source4/scripting/devel/wintest/test-howto.py

index d587529ea0ff2606fe3dedd68a2b835c297ebd7e..ad93ef642b4b88fe9b1dcdf675ca5d34c71f2e38 100755 (executable)
@@ -560,6 +560,8 @@ if __name__ == '__main__':
     parser.add_option("--conf", type='string', default='', help='config file')
     parser.add_option("--skip", type='string', default='', help='list of steps to skip (comma separated)')
     parser.add_option("--list", action='store_true', default=False, help='list the available steps')
+    parser.add_option("--rebase", action='store_true', default=False, help='do a git pull --rebase')
+    parser.add_option("--clean", action='store_true', default=False, help='clean the tree')
 
     opts, args = parser.parse_args()
 
@@ -572,5 +574,15 @@ if __name__ == '__main__':
     t.set_skip(opts.skip)
     if opts.list:
         t.list_steps_mode()
-    test_howto(t)
 
+    if opts.rebase:
+        t.info('rebasing')
+        t.chdir('${SOURCETREE}')
+        t.run_cmd('git pull --rebase')
+
+    if opts.clean:
+        t.info('rebasing')
+        t.chdir('${SOURCETREE}/source4')
+        t.run_cmd('rm -rf bin')
+
+    test_howto(t)