Replace 'unlink' with 'rm' in tests.
authorDmitrij D. Czarkoff <czarkoff@gmail.com>
Wed, 26 Mar 2014 11:27:19 +0000 (12:27 +0100)
committerJelmer Vernooij <jelmer@samba.org>
Sat, 29 Mar 2014 11:31:07 +0000 (11:31 +0000)
Several Unix-like systems (eg. OpenBSD) don't have 'unlink' utility. 'rm' does
exactly the same job, so using 'rm' instead of 'unlink' makes dulwich tests
more portable.

Signed-off-by: Jelmer Vernooij <jelmer@samba.org>
dulwich/tests/test_hooks.py
dulwich/tests/test_repository.py

index 018c2b7257b0a82483187684aa1096e5032d8032..daa6d8299ec38e11b8fa26b9a3f7611a75e1078f 100644 (file)
@@ -113,7 +113,7 @@ exit 0
 
         (fd, path) = tempfile.mkstemp()
         post_commit_msg = """#!/bin/sh
-unlink %(file)s
+rm %(file)s
 """ % {'file': path}
 
         post_commit_msg_fail = """#!/bin/sh
index 64615649525141b10ee59b30536ead266e282397..68e04b9e6313e14084dd893b8fa6db9f1c9a35c8 100644 (file)
@@ -460,7 +460,7 @@ exit 0
 
         (fd, path) = tempfile.mkstemp(dir=repo_dir)
         post_commit_msg = """#!/bin/sh
-unlink %(file)s
+rm %(file)s
 """ % {'file': path}
 
         root_sha = r.do_commit(