summaryrefslogtreecommitdiffstats
path: root/test/generate_buildtest.pl
diff options
context:
space:
mode:
authorRichard Levitte <levitte@openssl.org>2016-06-03 15:02:10 +0200
committerRichard Levitte <levitte@openssl.org>2016-06-04 01:22:08 +0200
commitbffb149054cb326c8b7aeb65995e445c5f890e6a (patch)
tree8cab3fa0da939af690993056ce8100ace2771f46 /test/generate_buildtest.pl
parent39a470088af6f833bd1a912908c44bf4a9f48b0c (diff)
Generate simple build test files
Generate small test programs to check that external programs can be built with our stuff at a very basic level. For now, they check that each of our header files can be included individually without compile failure. Reviewed-by: Rich Salz <rsalz@openssl.org>
Diffstat (limited to 'test/generate_buildtest.pl')
-rw-r--r--test/generate_buildtest.pl27
1 files changed, 27 insertions, 0 deletions
diff --git a/test/generate_buildtest.pl b/test/generate_buildtest.pl
new file mode 100644
index 0000000000..7921021e45
--- /dev/null
+++ b/test/generate_buildtest.pl
@@ -0,0 +1,27 @@
+#! /usr/bin/env perl
+# Copyright 2016 The OpenSSL Project Authors. All Rights Reserved.
+#
+# Licensed under the OpenSSL license (the "License"). You may not use
+# this file except in compliance with the License. You can obtain a copy
+# in the file LICENSE in the source distribution or at
+# https://www.openssl.org/source/license.html
+
+use strict;
+use warnings;
+
+# First argument is name;
+my $name = shift @ARGV;
+# All other arguments are ignored for now
+
+print <<"_____";
+/*
+ * Generated with test/generate_buildtest.pl, to check that such a simple
+ * program builds.
+ */
+#include <openssl/$name.h>
+
+int main()
+{
+ return 0;
+}
+_____