diff --git a/test/gtest_schema.cpp b/test/gtest_schema.cpp
index 45764b20837e25ea25cf1e9fddbb603346bfbd40..5125fd00dc7752ad911c4e68b8c895b730773499 100644
--- a/test/gtest_schema.cpp
+++ b/test/gtest_schema.cpp
@@ -124,18 +124,25 @@ TEST(Schema, validate_all_schemas)
 
 TEST(Schema, duplicated_schemas)
 {
-    std::set<std::string> schemas_found;
-
+    std::map<std::string, std::string> schemas_found;
+    unsigned int n_duplicated = 0;
     for (auto const& entry : filesystem::recursive_directory_iterator(wolf_dir))
     {
         if (filesystem::is_regular_file(entry) and entry.path().extension().string() == ".schema")
         {
-            ASSERT_FALSE(schemas_found.count(entry.path().filename().string()));
-            schemas_found.insert(entry.path().filename().string());
+            bool duplicated = schemas_found.count(entry.path().filename().string());
+            WOLF_ERROR_COND(duplicated,
+                            "Found duplicated schema file:\n",
+                            entry.path().string(),
+                            "\n",
+                            schemas_found[entry.path().filename().string()])
+            schemas_found[entry.path().filename().string()] = entry.path().string();
+            if (duplicated) n_duplicated++;
         }
     }
-
-    WOLF_INFO("Found ", schemas_found.size(), " schema files.");
+    ASSERT_EQ(n_duplicated, 0);
+    WOLF_INFO_COND(n_duplicated == 0, "Found ", schemas_found.size(), " schema files.");
+    WOLF_ERROR_COND(n_duplicated != 0, "Found ", n_duplicated, " duplicated schemas in ", schemas_found.size(), " schema files.");
 }
 
 int main(int argc, char** argv)