]> git.sur5r.net Git - i3/i3/commitdiff
Testcases: Check for required binaries (#2655)
authorTony Crisci <tony@dubstepdish.com>
Mon, 23 Jan 2017 07:40:08 +0000 (02:40 -0500)
committerMichael Stapelberg <stapelberg@users.noreply.github.com>
Mon, 23 Jan 2017 07:40:08 +0000 (23:40 -0800)
Fail fast in case test binaries are not built and provide instructions
on how to build them.

testcases/complete-run.pl.in

index d872bda11d870cd1b66596bcffeb089d9d4eecc6..2019253c49ca99965d9ac00941f73d2f03d1acef 100755 (executable)
@@ -87,6 +87,17 @@ foreach my $binary (@binaries) {
     die "$binary is not an executable" unless -x $binary;
 }
 
+my @test_binaries = qw(
+                        @abs_top_builddir@/test.commands_parser
+                        @abs_top_builddir@/test.config_parser
+                        @abs_top_builddir@/test.inject_randr15
+                    );
+
+foreach my $binary (@test_binaries) {
+    die "$binary executable not found, did you run “make check”?" unless -e $binary;
+    die "$binary is not an executable" unless -x $binary;
+}
+
 $ENV{PATH} = join(':',
     '@abs_top_builddir@/i3-nagbar',
     '@abs_top_builddir@/i3-msg',