• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
  • Help
    • Online help
    • Learn Git
    • Welcome to Bitbucket
    • Keyboard shortcuts
  • Log In
Alexander Dahl
  1. Alexander Dahl

buildroot

Public
Actions
  • Clone
  • Compare

Learn more about cloning repositories

You have read-only access

Navigation
  • Source
  • Commits
  • Branches
  • All Branches Graph
  • Forks
  1. Alexander Dahl
  2. buildroot

Source

buildroot/package/libcodec2/0002-Add-option-to-disable-unit-tests.patch
Bernd KuhlsBernd Kuhls committed 67027b6f4bf11 Aug 2015
Raw file
Source viewDiff to previous
 
1
From 19db6244200b870317382294f14b7d561d55a64e Mon Sep 17 00:00:00 2001
2
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
3
Date: Sat, 29 Aug 2015 12:05:53 +0200
4
Subject: [PATCH] Add option to disable unit tests
5
​
6
The unittests require C++, while the rest of the library does not, so
7
this commit implements a --{enable,disable}-unittests option to
8
selectively enable the build of the unit tests. When not provided, the
9
option defaults to yes so that the existing behavior is preserved.
10
​
11
Based on initial work by Bernd Kuhls.
12
​
13
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
14
---
15
 Makefile.am  | 6 +++++-
16
 configure.ac | 5 +++++
17
 2 files changed, 10 insertions(+), 1 deletion(-)
18
​
19
diff --git a/Makefile.am b/Makefile.am
20
index bd3ce01..1da250b 100644
21
--- a/Makefile.am
22
+++ b/Makefile.am
23
@@ -95,4 +95,8 @@ src/codebook/lsp8.txt \
24
 src/codebook/lsp9.txt \
25
 src/codebook/lsp10.txt
26
 
27
-SUBDIRS = src unittest
28
+SUBDIRS = src
29
+
30
+if UNITTESTS
31
+SUBDIRS += unittest
32
+endif
33
diff --git a/configure.ac b/configure.ac
34
index 7520af6..55b7215 100644
35
--- a/configure.ac
36
+++ b/configure.ac
37
@@ -24,5 +24,10 @@ AC_CHECK_HEADERS([stdlib.h string.h])
38
 AC_FUNC_MALLOC
39
 AC_CHECK_FUNCS([floor pow sqrt])
40
 
41
+AC_ARG_ENABLE([unittests],
42
+   AS_HELP_STRING([--disable-unittests], [Disable unittests]),
43
+   [], [enable_unittests=yes])
44
+AM_CONDITIONAL([UNITTESTS], [test "${enable_unittests}" = "yes"])
45
+
46
 AC_CONFIG_FILES([Makefile src/Makefile unittest/Makefile codec2.pc])
47
 AC_OUTPUT
48
-- 
49
2.5.0
50
​
  • Git repository management for enterprise teams powered by Atlassian Bitbucket
  • Atlassian Bitbucket v6.7.2
  • Documentation
  • Request a feature
  • About
  • Contact Atlassian
Atlassian

Everything looks good. We'll let you know here if there's anything you should know about.