Merge branch 'development' into issue/wrong-suite-name-in-check_test_cases_py
diff --git a/tests/compat.sh b/tests/compat.sh
index ac29e50..a101ffd 100755
--- a/tests/compat.sh
+++ b/tests/compat.sh
@@ -125,7 +125,7 @@
 print_test_case() {
     for i in $3; do
         uniform_title $1 $2 $i
-        echo $TITLE
+        echo "compat;$TITLE"
     done
 }
 
diff --git a/tests/scripts/check_test_cases.py b/tests/scripts/check_test_cases.py
index 68e7e69..5cac960 100755
--- a/tests/scripts/check_test_cases.py
+++ b/tests/scripts/check_test_cases.py
@@ -137,8 +137,14 @@
     def process_test_case(self, _per_file_state,
                           file_name, _line_number, description):
         """Record an available test case."""
-        base_name = re.sub(r'\.[^.]*$', '', re.sub(r'.*/', '', file_name))
-        key = ';'.join([base_name, description.decode('utf-8')])
+        if file_name.endswith('.data'):
+            base_name = re.sub(r'\.[^.]*$', '', re.sub(r'.*/', '', file_name))
+            key = ';'.join([base_name, description.decode('utf-8')])
+        else:
+            # For test cases defined in scripts (i.e. ssl-op.sh and compat.sh),
+            # we need the script to list the suite name, and use the outputs
+            # as keys directly.
+            key = description.decode('utf-8')
         self.descriptions.add(key)
 
 def collect_available_test_cases():
@@ -166,6 +172,15 @@
         """Check test case descriptions for errors."""
         results = self.results
         seen = per_file_state
+        if not file_name.endswith('.data'):
+            script_output = description.split(b';', 1)
+            if len(script_output) == 2:
+                description = script_output[1]
+            else:
+                results.error(file_name, line_number,
+                              '"{}" should be listed in '
+                              '"<suite>;<description>" format',
+                              description.decode('ascii'))
         if description in seen:
             results.error(file_name, line_number,
                           'Duplicate description (also line {})',
diff --git a/tests/ssl-opt.sh b/tests/ssl-opt.sh
index 4762285..8a27f6d 100755
--- a/tests/ssl-opt.sh
+++ b/tests/ssl-opt.sh
@@ -1629,7 +1629,7 @@
     fi
 
     if [ "$LIST_TESTS" -gt 0 ]; then
-        printf "%s\n" "$NAME"
+        printf "%s\n" "${TEST_SUITE_NAME:-ssl-opt};$NAME"
         return
     fi