Document PGXS' REGRESS feature.
authorAlvaro Herrera
Tue, 29 Nov 2005 01:46:54 +0000 (01:46 +0000)
committerAlvaro Herrera
Tue, 29 Nov 2005 01:46:54 +0000 (01:46 +0000)
doc/src/sgml/xfunc.sgml

index e5dfe9d48cd994ed222afa7033d1e7619e005fa2..f9840bd4663c667ccc5483033e2e5b3904dae3ea 100644 (file)
@@ -1,5 +1,5 @@
 
 
  
@@ -2106,7 +2106,7 @@ include $(PGXS)
       REGRESS
       
        
-        list of regression test cases (without suffix)
+        list of regression test cases (without suffix), see below
        
       
      
@@ -2186,6 +2186,36 @@ include $(PGXS)
     corresponds to the first pg_config command
     found in your path.
    
+
+   
+    The scripts listed in the REGRESS variable are used for
+    regression testing of your module, just like make
+    installcheck is used for the main
+    PostgreSQL server.  For this to work you need
+    to have a subdirectory named sql/ in your extension's
+    directory, within which you put one file for each group of tests you want
+    to run.  The files should have extension .sql, which
+    should not be included in the REGRESS list in the
+    makefile.  For each test there should be a file containing the expected
+    result in a subdirectory named expected/, with extension
+    .out.  The tests are run by executing make
+    installcheck, and the resulting output will be compared to the
+    expected files.  The differences will be written to the file
+    regression.diffs in diff -c format.
+    Note that trying to run a test which is missing the expected file will be
+    reported as trouble, so make sure you have all expected
+    files.
+   
+
+   
+    
+     The easiest way of creating the expected files is creating empty files,
+     then carefully inspecting the result files after a test run (to be found
+     in the results/ directory), and copying them to
+     expected/ if they match what you want from the test.
+    
+   
+