]> git.ipfire.org Git - thirdparty/curl.git/commitdiff
runtests: parse data/Makefile.inc instead of using make 7177/head
authorDaniel Stenberg <daniel@haxx.se>
Wed, 2 Jun 2021 14:38:57 +0000 (16:38 +0200)
committerDaniel Stenberg <daniel@haxx.se>
Wed, 2 Jun 2021 21:21:18 +0000 (23:21 +0200)
The warning about missing entries in that file then doesn't require that
the Makefile has been regenerated which was confusing.

The scan for the test num is a little more error prone than before
(since now it doesn't actually verify that it is legitimate Makefile
syntax), but I think it is good enough.

Closes #7177

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

index 3588ebd9c0a98528f29ca9e8ca6f1ace55f448f2..2e10bd4d171d76f5e96371ae697864e6f51fef2e 100644 (file)
@@ -5,7 +5,7 @@
 #                            | (__| |_| |  _ <| |___
 #                             \___|\___/|_| \_\_____|
 #
-# Copyright (C) 1998 - 2020, Daniel Stenberg, <daniel@haxx.se>, et al.
+# Copyright (C) 1998 - 2021, Daniel Stenberg, <daniel@haxx.se>, et al.
 #
 # This software is licensed as described in the file COPYING, which
 # you should have received as part of this distribution. The terms
@@ -45,6 +45,3 @@ filecheck:
        RC=$$? ; \
        rm -rf test-place ; \
        exit $$RC
-
-show:
-       @echo $(EXTRA_DIST)
index c2d9289f311cbf7c7c263e26f72b9e88b97f9046..696c11a727c50678c135ca548fb980825b8ec802 100755 (executable)
@@ -578,12 +578,15 @@ sub checkcmd {
 #
 my $disttests;
 sub get_disttests {
-    my $makeCmd = 'make';
-    if(-f "../CMakeCache.txt") {
-        $makeCmd = 'cmake --build ../.. --target';
+    open(D, "<$TESTDIR/Makefile.inc");
+    while(<D>) {
+        chomp $_;
+        if(($_ =~ /^#/) ||($_ !~ /test/)) {
+            next;
+        }
+        $disttests .= join("", $_);
     }
-    my @dist = `cd data && $makeCmd show`;
-    $disttests = join("", @dist);
+    close(D);
 }
 
 #######################################################################