[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

[lintian] 01/01: t: Add test for custom OCaml executables



This is an automated email from the git hooks/post-receive script.

nthykier pushed a commit to branch master
in repository lintian.

commit e5b0cd4190c24c013845ee4f129102767ded484a
Author: Niels Thykier <niels@thykier.net>
Date:   Wed Jul 22 20:30:10 2015 +0200

    t: Add test for custom OCaml executables
    
    Signed-off-by: Niels Thykier <niels@thykier.net>
---
 t/COVERAGE                                   |  8 +++-----
 t/tests/binaries-general/debian/Makefile     |  3 +++
 t/tests/binaries-general/debian/debian/rules |  2 +-
 t/tests/binaries-general/debian/ocaml.c      | 11 +++++++++++
 t/tests/binaries-general/desc                |  1 +
 t/tests/binaries-general/tags                |  1 +
 6 files changed, 20 insertions(+), 6 deletions(-)

diff --git a/t/COVERAGE b/t/COVERAGE
index cd93dee..cb440f9 100644
--- a/t/COVERAGE
+++ b/t/COVERAGE
@@ -1,11 +1,9 @@
-Last generated 2015-07-09
-Coverage (Tags): 1069/1137 (94.02%), w. legacy tests: 1126/1137 (99.03%)
-Coverage (Checks): 38/46 (82.61%), w. legacy tests: 40/46 (86.96%)
+Last generated 2015-07-22
+Coverage (Tags): 1071/1138 (94.11%), w. legacy tests: 1128/1138 (99.12%)
+Coverage (Checks): 38/46 (82.61%), w. legacy tests: 41/46 (89.13%)
 
 The following tags are not tested by the test suite:
 
-binaries ocaml-custom-executable
-
 deb-format tar-errors-from-control
 
 files debug-package-should-be-named-dbg
diff --git a/t/tests/binaries-general/debian/Makefile b/t/tests/binaries-general/debian/Makefile
index 5f0f442..486ff4c 100644
--- a/t/tests/binaries-general/debian/Makefile
+++ b/t/tests/binaries-general/debian/Makefile
@@ -14,6 +14,8 @@ all:
 	$(COMPILE) -o basicshippedrpathmore basic.c -Wl,--rpath,/usr/lib/binaries-general:/usr/lib/binaries-general/bar
 	# static version of basic for debugging checks
 	$(COMPILE) -static -o basic.static basic.c
+	# static executable to trigger ocaml check
+	$(COMPILE) -o ocaml-exec ocaml.c
 	# version with debug
 	$(COMPILE) -o basicdebug -g3 -Wl,--build-id basic.c
 
@@ -29,6 +31,7 @@ install:
 	strip -s $(DESTDIR)/usr/lib/debug/usr/share/foo/basic
 	install -m 755 -c basiclibrpath $(DESTDIR)/usr/lib/foo/basiclibrpath
 	install -m 755 -c basicshippedrpath $(DESTDIR)/usr/lib/foo/basicshippedrpath
+	install -m 755 -c ocaml-exec $(DESTDIR)/usr/lib/foo/ocaml-exec
 	install -m 744 -c basicshippedrpathmore $(DESTDIR)/usr/lib/foo/basicshippedrpathmore
 	objcopy --only-keep-debug basic $(DESTDIR)/usr/lib/debug/basic
 	install -d "$(DESTDIR)/usr/lib/debug/.build-id/"`$(GETBUILDID) -s basicdebug`
diff --git a/t/tests/binaries-general/debian/debian/rules b/t/tests/binaries-general/debian/debian/rules
index 37608c2..8e379dd 100644
--- a/t/tests/binaries-general/debian/debian/rules
+++ b/t/tests/binaries-general/debian/debian/rules
@@ -4,4 +4,4 @@
 	dh $@
 
 override_dh_strip:
-	dh_strip -X usr/lib/debug -X unstripped
+	dh_strip -X usr/lib/debug -X unstripped -X ocaml
diff --git a/t/tests/binaries-general/debian/ocaml.c b/t/tests/binaries-general/debian/ocaml.c
new file mode 100644
index 0000000..370d17d
--- /dev/null
+++ b/t/tests/binaries-general/debian/ocaml.c
@@ -0,0 +1,11 @@
+#include <stdio.h>
+
+int
+main(int argc, char **argv)
+{
+  if (argc > 2) {
+    puts("Caml1999X000");
+  }
+  puts("\n");
+  return 0;
+}
diff --git a/t/tests/binaries-general/desc b/t/tests/binaries-general/desc
index 998e593..37b75da 100644
--- a/t/tests/binaries-general/desc
+++ b/t/tests/binaries-general/desc
@@ -11,5 +11,6 @@ Test-For:
  debug-file-should-use-detached-symbols
  debug-file-with-no-debug-symbols
  library-in-debug-or-profile-should-not-be-stripped
+ ocaml-custom-executable
  statically-linked-binary
  unstripped-binary-or-object
diff --git a/t/tests/binaries-general/tags b/t/tests/binaries-general/tags
index 75c0aae..d22453a 100644
--- a/t/tests/binaries-general/tags
+++ b/t/tests/binaries-general/tags
@@ -12,3 +12,4 @@ W: binaries-general: binary-without-manpage usr/bin/unstripped
 W: binaries-general: debug-file-should-use-detached-symbols usr/lib/debug/.build-id/de/deadbeefdeadbeef.debug
 W: binaries-general: debug-file-with-no-debug-symbols usr/lib/debug/usr/share/foo/basic
 W: binaries-general: debug-package-should-be-named-dbg usr/lib/debug/.build-id/
+W: binaries-general: ocaml-custom-executable usr/lib/foo/ocaml-exec

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/lintian/lintian.git


Reply to: