[Forensics-changes] [yara] 178/192: Add test case for making sure that version numbers in configure.ac and libyara.h are in sync
Hilko Bengen
bengen at moszumanska.debian.org
Sat Jul 1 10:32:01 UTC 2017
This is an automated email from the git hooks/post-receive script.
bengen pushed a commit to annotated tag v3.6.0
in repository yara.
commit 00ebed73d6f17a7f7884d101a1967077f9f319a1
Author: plusvic <plusvic at gmail.com>
Date: Mon May 15 18:39:36 2017 +0200
Add test case for making sure that version numbers in configure.ac and libyara.h are in sync
---
Makefile.am | 3 ++-
tests/test-version.c | 39 +++++++++++++++++++++++++++++++++++++++
2 files changed, 41 insertions(+), 1 deletion(-)
diff --git a/Makefile.am b/Makefile.am
index 94e9d15..0717a05 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -29,7 +29,7 @@ yarac_SOURCES = args.c args.h yarac.c
yarac_LDADD = libyara/.libs/libyara.a
TESTS = $(check_PROGRAMS)
-check_PROGRAMS = test-alignment test-rules test-pe test-elf
+check_PROGRAMS = test-alignment test-rules test-pe test-elf test-version
# The -fsanitize=address option makes test-exception fail. Include the test
# only if the option is not enabled.
@@ -47,6 +47,7 @@ test_elf_SOURCES = tests/test-elf.c tests/util.c
test_elf_LDADD = libyara/.libs/libyara.a
test_exception_SOURCES = tests/test-exception.c tests/util.c
test_exception_LDADD = libyara/.libs/libyara.a
+test_version_SOURCES = tests/test-version.c
# man pages
man1_MANS = yara.man yarac.man
diff --git a/tests/test-version.c b/tests/test-version.c
new file mode 100644
index 0000000..be5e988
--- /dev/null
+++ b/tests/test-version.c
@@ -0,0 +1,39 @@
+/*
+Copyright (c) 2016. The YARA Authors. All Rights Reserved.
+
+Redistribution and use in source and binary forms, with or without modification,
+are permitted provided that the following conditions are met:
+
+1. Redistributions of source code must retain the above copyright notice, this
+list of conditions and the following disclaimer.
+
+2. Redistributions in binary form must reproduce the above copyright notice,
+this list of conditions and the following disclaimer in the documentation and/or
+other materials provided with the distribution.
+
+3. Neither the name of the copyright holder nor the names of its contributors
+may be used to endorse or promote products derived from this software without
+specific prior written permission.
+
+THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
+ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
+WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR
+ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
+(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
+ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+*/
+
+#include <yara.h>
+#include <strings.h>
+
+int main (int argc, char **argv)
+{
+ // make sure that versions defined in configure.ac and in
+ // libyara/include/yara/libyara.h are in sync.
+
+ return strcmp(PACKAGE_VERSION, YR_VERSION);
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/forensics/yara.git
More information about the forensics-changes
mailing list