diff mbox

acpi: einj, msct: only build in these tests on ACPI enabled systems

Message ID 1461595212-3267-1-git-send-email-colin.king@canonical.com
State Accepted
Headers show

Commit Message

Colin Ian King April 25, 2016, 2:40 p.m. UTC
From: Colin Ian King <colin.king@canonical.com>

These tests fail to build on non-ACPI targets, so make sure they
only build if FWTS_HAS_ACPI is defined.

Signed-off-by: Colin Ian King <colin.king@canonical.com>
---
 src/acpi/einj/einj.c | 5 +++++
 src/acpi/msct/msct.c | 5 +++++
 2 files changed, 10 insertions(+)

Comments

Alex Hung April 26, 2016, 2:08 a.m. UTC | #1
On 2016-04-25 10:40 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> These tests fail to build on non-ACPI targets, so make sure they
> only build if FWTS_HAS_ACPI is defined.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/einj/einj.c | 5 +++++
>   src/acpi/msct/msct.c | 5 +++++
>   2 files changed, 10 insertions(+)
>
> diff --git a/src/acpi/einj/einj.c b/src/acpi/einj/einj.c
> index 4efd71a..3eae36a 100644
> --- a/src/acpi/einj/einj.c
> +++ b/src/acpi/einj/einj.c
> @@ -13,6 +13,9 @@
>    *
>    */
>   #include "fwts.h"
> +
> +#if defined(FWTS_HAS_ACPI)
> +
>   #include "fwts_acpi_object_eval.h"
>
>   #include <stdlib.h>
> @@ -165,3 +168,5 @@ static fwts_framework_ops einj_ops = {
>
>   FWTS_REGISTER("einj", &einj_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
>   	      FWTS_FLAG_TEST_ACPI)
> +
> +#endif
> diff --git a/src/acpi/msct/msct.c b/src/acpi/msct/msct.c
> index 9432cf6..88c29d3 100644
> --- a/src/acpi/msct/msct.c
> +++ b/src/acpi/msct/msct.c
> @@ -13,6 +13,9 @@
>    *
>    */
>   #include "fwts.h"
> +
> +#if defined(FWTS_HAS_ACPI)
> +
>   #include "fwts_acpi_object_eval.h"
>
>   #include <stdlib.h>
> @@ -130,3 +133,5 @@ static fwts_framework_ops msct_ops = {
>
>   FWTS_REGISTER("msct", &msct_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
>   	      FWTS_FLAG_TEST_ACPI)
> +
> +#endif
>

Acked-by: Alex Hung <alex.hung@canonical.com>
Ivan Hu April 29, 2016, 7:27 a.m. UTC | #2
On 04/25/2016 10:40 PM, Colin King wrote:
> From: Colin Ian King <colin.king@canonical.com>
>
> These tests fail to build on non-ACPI targets, so make sure they
> only build if FWTS_HAS_ACPI is defined.
>
> Signed-off-by: Colin Ian King <colin.king@canonical.com>
> ---
>   src/acpi/einj/einj.c | 5 +++++
>   src/acpi/msct/msct.c | 5 +++++
>   2 files changed, 10 insertions(+)
>
> diff --git a/src/acpi/einj/einj.c b/src/acpi/einj/einj.c
> index 4efd71a..3eae36a 100644
> --- a/src/acpi/einj/einj.c
> +++ b/src/acpi/einj/einj.c
> @@ -13,6 +13,9 @@
>    *
>    */
>   #include "fwts.h"
> +
> +#if defined(FWTS_HAS_ACPI)
> +
>   #include "fwts_acpi_object_eval.h"
>   
>   #include <stdlib.h>
> @@ -165,3 +168,5 @@ static fwts_framework_ops einj_ops = {
>   
>   FWTS_REGISTER("einj", &einj_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
>   	      FWTS_FLAG_TEST_ACPI)
> +
> +#endif
> diff --git a/src/acpi/msct/msct.c b/src/acpi/msct/msct.c
> index 9432cf6..88c29d3 100644
> --- a/src/acpi/msct/msct.c
> +++ b/src/acpi/msct/msct.c
> @@ -13,6 +13,9 @@
>    *
>    */
>   #include "fwts.h"
> +
> +#if defined(FWTS_HAS_ACPI)
> +
>   #include "fwts_acpi_object_eval.h"
>   
>   #include <stdlib.h>
> @@ -130,3 +133,5 @@ static fwts_framework_ops msct_ops = {
>   
>   FWTS_REGISTER("msct", &msct_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
>   	      FWTS_FLAG_TEST_ACPI)
> +
> +#endif
Acked-by: Ivan Hu <ivan.hu@canonical.com>
diff mbox

Patch

diff --git a/src/acpi/einj/einj.c b/src/acpi/einj/einj.c
index 4efd71a..3eae36a 100644
--- a/src/acpi/einj/einj.c
+++ b/src/acpi/einj/einj.c
@@ -13,6 +13,9 @@ 
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include "fwts_acpi_object_eval.h"
 
 #include <stdlib.h>
@@ -165,3 +168,5 @@  static fwts_framework_ops einj_ops = {
 
 FWTS_REGISTER("einj", &einj_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
 	      FWTS_FLAG_TEST_ACPI)
+
+#endif
diff --git a/src/acpi/msct/msct.c b/src/acpi/msct/msct.c
index 9432cf6..88c29d3 100644
--- a/src/acpi/msct/msct.c
+++ b/src/acpi/msct/msct.c
@@ -13,6 +13,9 @@ 
  *
  */
 #include "fwts.h"
+
+#if defined(FWTS_HAS_ACPI)
+
 #include "fwts_acpi_object_eval.h"
 
 #include <stdlib.h>
@@ -130,3 +133,5 @@  static fwts_framework_ops msct_ops = {
 
 FWTS_REGISTER("msct", &msct_ops, FWTS_TEST_ANYTIME, FWTS_FLAG_BATCH |
 	      FWTS_FLAG_TEST_ACPI)
+
+#endif