diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-10 20:53:26 -0700 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2020-02-10 20:55:23 -0700 |
commit | d5003c566d49b2c43726dc0575dd934476e5f9a4 (patch) | |
tree | cc193a6cffd1a7ec469090c82f820e7ed53c6f4b /t/lib | |
parent | 0e8636ba575c0125437d445d56bab18c393fb331 (diff) | |
download | p5-Git-Annex-d5003c566d49b2c43726dc0575dd934476e5f9a4.tar.gz |
skip most tests when git-annex not available
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 't/lib')
-rw-r--r-- | t/lib/t/Util.pm | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/t/lib/t/Util.pm b/t/lib/t/Util.pm index 350dfeb..dea6a42 100644 --- a/t/lib/t/Util.pm +++ b/t/lib/t/Util.pm @@ -12,7 +12,8 @@ use File::Temp qw(tempdir); use Try::Tiny; use Capture::Tiny qw(capture); -our @EXPORT = qw( corrupt_annexed_file device_id_issues run_bin ); +our @EXPORT + = qw( corrupt_annexed_file device_id_issues git_annex_available run_bin ); sub corrupt_annexed_file { my ($git, $file) = @_; @@ -40,6 +41,11 @@ sub device_id_issues { return ($foo_id != $bar_id); } +sub git_annex_available { + `which git-annex`; + return !$?; +} + sub run_bin { (my $bin = "App::" . shift) =~ tr/-/_/; local @ARGV = @_; |