]> granicus.if.org Git - curl/commitdiff
- The tests/runtests.pl script now checks to see if the test case that runs is
authorDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jan 2010 15:50:30 +0000 (15:50 +0000)
committerDaniel Stenberg <daniel@haxx.se>
Mon, 11 Jan 2010 15:50:30 +0000 (15:50 +0000)
  present in the tests/data/Makefile.am and outputs a notice message on the
  screen if not. Each test file has to be included in that Makefile.am to get
  included in release archives and forgetting to add files there is a common
  mistake. This is an attempt to make it harder to forget.

CHANGES
tests/data/Makefile.am
tests/runtests.pl

diff --git a/CHANGES b/CHANGES
index c9be56c64156d617833fd801f6a9cdcf528860fe..0315cd1978f6a20d5c0102cf04f6270088b22000 100644 (file)
--- a/CHANGES
+++ b/CHANGES
@@ -6,6 +6,13 @@
 
                                   Changelog
 
+Daniel Stenberg (11 Jan 2010)
+- The tests/runtests.pl script now checks to see if the test case that runs is
+  present in the tests/data/Makefile.am and outputs a notice message on the
+  screen if not. Each test file has to be included in that Makefile.am to get
+  included in release archives and forgetting to add files there is a common
+  mistake. This is an attempt to make it harder to forget.
+
 Daniel Stenberg (9 Jan 2010)
 - Johan van Selst found and fixed a OpenSSL session ref count leak:
 
index 30e31448198d670f0addd53cfd45e6f2da1c025c..bb7d0e7a234f1bd82430f3368c5936074c7d3953 100644 (file)
@@ -84,3 +84,5 @@ filecheck:
        rm -rf test-place ; \
        exit $$RC
 
+show:
+       @echo $(EXTRA_DIST)
index 33baa815e668f48fc4cc51b2f146ddb6203cfc00..a2d5902e5c5c4f9844e73eabf9a211364ea4385d 100755 (executable)
@@ -425,6 +425,15 @@ sub checkcmd {
     }
 }
 
+#######################################################################
+# Get the list of tests that the tests/data/Makefile.am knows about!
+#
+my $disttests;
+sub get_disttests {
+    my @dist = `cd $srcdir/data && make show`;
+    $disttests = join("", @dist);
+}
+
 #######################################################################
 # Check for a command in the PATH of the machine running curl.
 #
@@ -1882,6 +1891,11 @@ sub singletest {
     # timestamp test preparation start
     $timeprepini{$testnum} = Time::HiRes::time() if($timestats);
 
+    if($disttests !~ /\Wtest$testnum\W/ ) {
+        print STDERR "NOTICE: data/test$testnum is not present in tests/data/Makefile.am!\n";
+    }
+
+
     # load the test case file definition
     if(loadtest("${TESTDIR}/test${testnum}")) {
         if($verbose) {
@@ -3307,6 +3321,7 @@ mkdir($LOGDIR, 0777);
 #
 
 if(!$listonly) {
+    get_disttests();
     checksystem();
 }