]> git.meshlink.io Git - catta/blobdiff - tests/c-plus-plus-test-gen.py
update C++ tests, and compile them only when HAVE_NETLINK is set
[catta] / tests / c-plus-plus-test-gen.py
index 62498f5b9566e31cde09a1da9653cc2efb57b7e3..46d67627cebedd6b0091c544eb34decb413ea676 100755 (executable)
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
 # USA.
 
-import os
+import os, sys
 
 def print_includes(dir):
 
     files = os.listdir("../%s" % dir)
     files = filter(lambda fn: fn.endswith(".h") and not fn.startswith("."), files)
+    files.sort()
 
     for f in files:
         print "#include <%s/%s>" % (dir, f)
@@ -50,10 +51,15 @@ print """/* $Id$ */
   Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
   USA.
 ***/
+
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
 """
 
-print_includes("avahi-common")
-print_includes("avahi-core")
+for f in sys.argv[1:]:
+    print_includes(f)
 
 print """
 int main(int argc, char*argv[]) {