All of lore.kernel.org
 help / color / mirror / Atom feed
From: Olof Johansson <olof@lixom.net>
To: yann.morin.1998@free.fr
Cc: linux-kernel@vger.kernel.org, linux-kbuild@vger.kernel.org,
	dvhart@linux.intel.com, john.stultz@linaro.org,
	jwboyer@redhat.com, Olof Johansson <olof@lixom.net>
Subject: [PATCH 10/10] merge_config.sh: add tests for cmdline configs
Date: Wed, 20 May 2015 15:01:00 -0700	[thread overview]
Message-ID: <1432159260-39390-11-git-send-email-olof@lixom.net> (raw)
In-Reply-To: <1432159260-39390-1-git-send-email-olof@lixom.net>

Again, these tests could be more complicated but at least it gets
the very basics covered.

Signed-off-by: Olof Johansson <olof@lixom.net>
---
 .../merge_config_test/12-cmdline-success.sh        |   13 +++++++++
 .../merge_config_test/13-cmdline-failure.sh        |   13 +++++++++
 .../merge_config_test/14-cmdline-reduntant.sh      |   13 +++++++++
 .../merge_config_test/15-cmdline-complex.sh        |   30 ++++++++++++++++++++
 4 files changed, 69 insertions(+)
 create mode 100755 scripts/kconfig/merge_config_test/12-cmdline-success.sh
 create mode 100755 scripts/kconfig/merge_config_test/13-cmdline-failure.sh
 create mode 100755 scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh
 create mode 100755 scripts/kconfig/merge_config_test/15-cmdline-complex.sh

diff --git a/scripts/kconfig/merge_config_test/12-cmdline-success.sh b/scripts/kconfig/merge_config_test/12-cmdline-success.sh
new file mode 100755
index 0000000..f8f2bf1
--- /dev/null
+++ b/scripts/kconfig/merge_config_test/12-cmdline-success.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. "$(dirname $0)/common.sh"
+
+# Turn off an option
+
+merge CONFIG_64BIT=n
+M=$?
+
+check CONFIG_64BIT=y
+G=$?
+
+[ $M -eq 0 -a $G -ne 0 ]
diff --git a/scripts/kconfig/merge_config_test/13-cmdline-failure.sh b/scripts/kconfig/merge_config_test/13-cmdline-failure.sh
new file mode 100755
index 0000000..6504786
--- /dev/null
+++ b/scripts/kconfig/merge_config_test/13-cmdline-failure.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. "$(dirname $0)/common.sh"
+
+# Try to turn off an option that won't turn off.
+
+merge CONFIG_MMU=n
+M=$?
+
+check CONFIG_MMU=y
+G=$?
+
+[ $M -ne 0 -a $G -eq 0 ]
diff --git a/scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh b/scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh
new file mode 100755
index 0000000..c9c3fab
--- /dev/null
+++ b/scripts/kconfig/merge_config_test/14-cmdline-reduntant.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+. "$(dirname $0)/common.sh"
+
+# Make sure redundant options are warned about
+
+merge_r CONFIG_64BIT=n CONFIG_64BIT=n
+M=$?
+
+check CONFIG_64BIT=y
+G=$?
+
+[ $M -ne 0 -a $G -ne 0 ]
diff --git a/scripts/kconfig/merge_config_test/15-cmdline-complex.sh b/scripts/kconfig/merge_config_test/15-cmdline-complex.sh
new file mode 100755
index 0000000..b754610
--- /dev/null
+++ b/scripts/kconfig/merge_config_test/15-cmdline-complex.sh
@@ -0,0 +1,30 @@
+#!/bin/sh
+
+. "$(dirname $0)/common.sh"
+
+# Make sure redundant options are warned about
+
+FRAG1=$(writefrag) << EOF
+CONFIG_EMBEDDED=y
+EOF
+
+FRAG2=$(writefrag) << EOF
+CONFIG_MMU=n
+EOF
+
+merge_r ${FRAG1} CONFIG_64BIT=n ${FRAG2}
+M=$?
+
+check CONFIG_64BIT=y
+G1=$?
+
+check CONFIG_EMBEDDED=y
+G2=$?
+
+check CONFIG_MMU=y
+G3=$?
+
+[ $G1 -ne 0 -a $G2 -eq 0 -a $G3 -eq 0 ]
+G=$?
+
+[ $M -ne 0 -a $G -eq 0 ]
-- 
1.7.10.4


  parent reply	other threads:[~2015-05-20 22:02 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-05-20 22:00 Olof Johansson
2015-05-20 22:00 ` Olof Johansson
2015-05-20 22:00 ` [PATCH 01/10] merge_config.sh: factor out value parsing Olof Johansson
2015-05-20 22:00 ` [PATCH 02/10] merge_config.sh: print warnings on stderr Olof Johansson
2015-05-20 22:00 ` [PATCH 03/10] merge_config.sh: minor argument parsing refactoring Olof Johansson
2015-05-20 22:00 ` [PATCH 04/10] merge_config.sh: exit non-0 in case of failures Olof Johansson
2015-05-20 22:00 ` [PATCH 05/10] merge_config.sh: Better handling of CONFIG_FOO=n Olof Johansson
2015-05-20 22:00 ` [PATCH 06/10] merge_config.sh: only consider last value of symbols Olof Johansson
2015-05-20 22:00 ` [PATCH 07/10] merge_config.sh: add tests Olof Johansson
2015-05-20 22:00 ` [PATCH 08/10] merge_config.sh: use trap for cleanup Olof Johansson
2015-05-20 22:00 ` [PATCH 09/10] merge_config.sh: allow single configs to be passed in on cmdline Olof Johansson
2015-05-20 22:01 ` Olof Johansson [this message]
2015-10-28  0:42 [PATCH 00/10] merge_config misc reworks and testcases Olof Johansson
2015-10-28  0:42 ` [PATCH 10/10] merge_config.sh: add tests for cmdline configs Olof Johansson
2015-10-28  7:32   ` Darren Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1432159260-39390-11-git-send-email-olof@lixom.net \
    --to=olof@lixom.net \
    --cc=dvhart@linux.intel.com \
    --cc=john.stultz@linaro.org \
    --cc=jwboyer@redhat.com \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=yann.morin.1998@free.fr \
    --subject='Re: [PATCH 10/10] merge_config.sh: add tests for cmdline configs' \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.