summaryrefslogtreecommitdiff
path: root/debian/ada/confirm_debian_bugs.py
diff options
context:
space:
mode:
Diffstat (limited to 'debian/ada/confirm_debian_bugs.py')
-rw-r--r--debian/ada/confirm_debian_bugs.py94
1 files changed, 44 insertions, 50 deletions
diff --git a/debian/ada/confirm_debian_bugs.py b/debian/ada/confirm_debian_bugs.py
index 7286382..c076730 100644
--- a/debian/ada/confirm_debian_bugs.py
+++ b/debian/ada/confirm_debian_bugs.py
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/python3
# Helper when migrating bugs from a gnat version to another.
@@ -11,15 +11,14 @@ import tempfile
os.environ ['LC_ALL'] = 'C'
-# If == new_version, "reassign" -> "found" and "retitle" -> "fixed".
-# Once the bug tracking system is informed,
-# please update this number.
-old_version = "5"
+# If True, "reassign" -> "found" and "retitle" -> "fixed".
+# Once the bug tracking system is informed, please update this boolean.
+same_gcc_base_version = True
# The current version.
-new_version = "6"
+new_version = "9"
-for line in subprocess.check_output (("dpkg", "--status", "gnat-" + new_version)).split ("\n"):
+for line in subprocess.check_output (("dpkg", "--status", "gnat-" + new_version)).decode ().split ("\n"):
if line.startswith ("Version: "):
deb_version = line [len ("Version: "):]
break
@@ -46,7 +45,7 @@ def attempt_to_reproduce (bug, make, sources):
return tmp_dir, status, stderr
def reassign_and_remove_dir (bug, tmp_dir):
- if old_version == new_version:
+ if same_gcc_base_version:
print ("found {} {}".format (bug, deb_version))
else:
print ("reassign {} {} {}".format (bug, "gnat-" + new_version, deb_version))
@@ -59,7 +58,7 @@ def report (bug, message, output):
def report_and_retitle (bug, message, output):
report (bug, message, output)
- if old_version == new_version:
+ if same_gcc_base_version:
print ("fixed {} {}".format (bug, deb_version))
else:
print ("retitle {} [Fixed in {}] <current title>".format (bug, new_version))
@@ -94,7 +93,7 @@ def check_produces_a_faulty_executable (bug, make, sources, regex, trigger):
if status != 0:
report (bug, "cannot compile the trigger anymore", stderr)
else:
- output = subprocess.check_output ((os.path.join (tmp_dir, trigger),), cwd=tmp_dir)
+ output = subprocess.check_output ((os.path.join (tmp_dir, trigger),), cwd=tmp_dir).decode ()
if re.search (regex, output):
reassign_and_remove_dir (bug, tmp_dir)
else:
@@ -142,7 +141,7 @@ end pak5;
check_reports_an_error_but_should_not (
bug = 246187,
make = ("gnatmake", "test_43"),
- regex = "Error detected at system.ads:156:5",
+ regex = "Error detected at test_43.ads:11:4",
sources = (
("test_43.ads", """package Test_43 is
type T1 is private;
@@ -660,7 +659,7 @@ end Test_128;
check_reports_an_error_but_should_not (
bug = 279893,
make = ("gnatmake", "test_129"),
- regex = """^gcc-[0-9.]+ -c test_129\.ads
+ regex = """gcc-[0-9.]+ -c test_129\.ads
test_129\.ads:1.:49: designated type of actual does not match that of formal "T2"
test_129\.ads:1.:49: instantiation abandoned
gnatmake: "test_129\.ads" compilation error$""",
@@ -814,44 +813,6 @@ private
end pak1;
"""),))
-# Once the bug box disappears, check the executable.
-# check_produces_a_faulty_executable (
-check_reports_an_error_but_should_not (
- bug = 427108,
- make = ("gnatmake", "test1"),
-# regex = "FAILED",
- regex = "Program_Error exp_disp.adb:7842 explicit raise",
- sources = (
- ("test1.adb", """-- "For the execution of a call on an inherited subprogram,
--- a call on the corresponding primitive subprogram of the
--- parent or progenitor type is performed; the normal conversion
--- of each actual parameter to the subtype of the corresponding
--- formal parameter (see 6.4.1) performs any necessary type
--- conversion as well."
-
-with Text_IO; use Text_IO;
-procedure Test1 is
- package Pak1 is
- type T1 is tagged null record;
- function Eq(X, Y: T1) return Boolean renames "=";
- end Pak1;
-
- package Pak2 is
- type T2 is new Pak1.T1 with record
- F1: Integer;
- end record;
- end Pak2;
-
- Z1: Pak2.T2 := (F1 => 1);
- Z2: Pak2.T2 := (F1 => 2);
-begin
- if Pak2.Eq(Z1, Z2) = Pak1.Eq(Pak1.T1(Z1), Pak1.T1(Z2))
- then Put_Line("PASSED");
- else Put_Line("FAILED");
- end if;
-end Test1;
-"""),))
-
check_reports_an_error_but_should_not (
bug = 660698,
make = ("gnatmake", "proc.adb"),
@@ -962,6 +923,39 @@ begin
end Test;
""")))
+check_produces_a_faulty_executable (
+ bug = 864969,
+ make = ("gnatmake", "main"),
+ trigger = "main",
+ regex = "ZZund",
+ sources = (
+ ("main.adb", """with Ada.Locales, Ada.Text_IO;
+procedure Main is
+begin
+ Ada.Text_IO.Put_Line (String (Ada.Locales.Country)
+ & String (Ada.Locales.Language));
+end Main;
+"""),))
+
+check_produces_a_faulty_executable (
+ bug = 894225,
+ make = ("gnatmake", "main"),
+ trigger = "main",
+ sources = (
+ ("main.adb",
+ """with Ada.Directories, Ada.Text_IO;
+procedure Main is
+begin
+ Ada.Text_IO.Put_Line (Ada.Directories.Containing_Directory ("/a/b/"));
+ Ada.Text_IO.Put_Line (Ada.Directories.Containing_Directory ("a/b/"));
+ Ada.Text_IO.Put_Line (Ada.Directories.Containing_Directory ("b/"));
+end Main;
+"""),
+ ),
+ regex = """^/a/b
+a/b
+b$""")
+
try:
os.rmdir (workspace)
except: