File: no_stderr_in_example.diff

package info (click to toggle)
gprbuild 2018-6
  • links: PTS, VCS
  • area: main
  • in suites: buster
  • size: 6,248 kB
  • sloc: ada: 68,368; xml: 4,043; makefile: 423; sh: 365; ansic: 97; cpp: 89; fortran: 62
file content (38 lines) | stat: -rw-r--r-- 1,283 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: make the tests usable as basic tests.
 We want a status report when we run the examples as
 tests, but not when we clean without gprclean.
 .
 Autopkg-test considers that a test fails if it emits on stderr.
Author: Nicolas Boulenguez <nicolas@debian.org>
Forwarded: not-needed

--- a/examples/subsystems/c_src/c_main.c
+++ b/examples/subsystems/c_src/c_main.c
@@ -1,3 +1,4 @@
+#include <stdlib.h>
 extern void adainit (void);
 extern void adafinal (void);
 extern void do_it_in_ada(void);
--- a/examples/Makefile
+++ b/examples/Makefile
@@ -2,5 +2,5 @@
 export PATH=${PTH}
 
 all clean run:
-	-${foreach dir,${wildcard */}, ${MAKE} $@ -C ${dir};}
+	${foreach dir,${wildcard */}, ${MAKE} $@ -C ${dir} && } true
 .PHONY: all clean run
--- a/examples/ada_f77/src/fm.adb
+++ b/examples/ada_f77/src/fm.adb
@@ -34,7 +34,11 @@
 
 with Ada.Text_IO; use Ada.Text_IO;
 with Ada.Integer_Text_IO;
+pragma Warnings (Off, """System.Parameters"" is An Internal GNAT Unit");
+pragma Warnings (Off, "use of This Unit is Non-Portable and Version-dependent");
 with System.Parameters;
+pragma Warnings (On, """System.Parameters"" is An Internal GNAT Unit");
+pragma Warnings (On, "use of This Unit is Non-Portable and Version-dependent");
 package body FM is
 
    Init_Error : exception;