diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-20 15:55:57 +0200 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2015-03-20 15:55:57 +0200 |
commit | faa623eb93f8e6f2334f4405f5a69c67484804e9 (patch) | |
tree | 46a0b60b81cf54bebafe93cb2b0c7929c2aa997e | |
parent | 29fa1dd52289ea3141c251f66b70bf660c7724e1 (diff) | |
download | meson-faa623eb93f8e6f2334f4405f5a69c67484804e9.tar.gz |
A few minor tweaks.
-rw-r--r-- | manual tests/3 git wrap/meson.build | 2 | ||||
-rw-r--r-- | wrap.py | 7 |
2 files changed, 6 insertions, 3 deletions
diff --git a/manual tests/3 git wrap/meson.build b/manual tests/3 git wrap/meson.build index f3cce0014..7fd5083ee 100644 --- a/manual tests/3 git wrap/meson.build +++ b/manual tests/3 git wrap/meson.build @@ -6,3 +6,5 @@ exe = executable('gitprog', 'prog.c', include_directories : sp.get_variable('subproj_inc'), link_with : sp.get_variable('subproj_lib'), ) + +test('maintest', exe) @@ -69,9 +69,10 @@ class Resolver: if revno.lower() == 'head': subprocess.check_call(['git', 'pull'], cwd=checkoutdir) else: - subprocess.check_call(['git', 'fetch'], cwd=checkoutdir) - subprocess.check_call(['git', 'checkout', revno], - cwd=checkoutdir) + if subprocess.call(['git', 'checkout', revno], cwd=checkoutdir) != 0: + subprocess.check_call(['git', 'fetch'], cwd=checkoutdir) + subprocess.check_call(['git', 'checkout', revno], + cwd=checkoutdir) else: subprocess.check_call(['git', 'clone', p.get('url'), p.get('directory')], cwd=self.subdir_root) |