From patchwork Tue Feb 16 12:39:58 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fam Zheng X-Patchwork-Id: 8324841 Return-Path: X-Original-To: patchwork-qemu-devel@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork2.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.136]) by patchwork2.web.kernel.org (Postfix) with ESMTP id C0FE6C02AE for ; Tue, 16 Feb 2016 12:49:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 345A720279 for ; Tue, 16 Feb 2016 12:49:12 +0000 (UTC) Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 57BD6202B8 for ; Tue, 16 Feb 2016 12:49:11 +0000 (UTC) Received: from localhost ([::1]:45336 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVf42-00066o-NX for patchwork-qemu-devel@patchwork.kernel.org; Tue, 16 Feb 2016 07:49:10 -0500 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVewH-0001pI-CO for qemu-devel@nongnu.org; Tue, 16 Feb 2016 07:41:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aVewG-0003M7-Ak for qemu-devel@nongnu.org; Tue, 16 Feb 2016 07:41:09 -0500 Received: from mx1.redhat.com ([209.132.183.28]:46279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aVewG-0003La-5B for qemu-devel@nongnu.org; Tue, 16 Feb 2016 07:41:08 -0500 Received: from int-mx11.intmail.prod.int.phx2.redhat.com (int-mx11.intmail.prod.int.phx2.redhat.com [10.5.11.24]) by mx1.redhat.com (Postfix) with ESMTPS id C1386C09FA80; Tue, 16 Feb 2016 12:41:07 +0000 (UTC) Received: from fam-t430.redhat.com (vpn1-7-134.pek2.redhat.com [10.72.7.134]) by int-mx11.intmail.prod.int.phx2.redhat.com (8.14.4/8.14.4) with ESMTP id u1GCdxbP024209; Tue, 16 Feb 2016 07:41:03 -0500 From: Fam Zheng To: qemu-devel@nongnu.org Date: Tue, 16 Feb 2016 20:39:58 +0800 Message-Id: <1455626399-7111-15-git-send-email-famz@redhat.com> In-Reply-To: <1455626399-7111-1-git-send-email-famz@redhat.com> References: <1455626399-7111-1-git-send-email-famz@redhat.com> X-Scanned-By: MIMEDefang 2.68 on 10.5.11.24 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 209.132.183.28 Cc: kwolf@redhat.com, peter.maydell@linaro.org, jsnow@redhat.com, stefanha@redhat.com, sw@weilnetz.de, Paolo Bonzini , =?UTF-8?q?Alex=20Benn=C3=A9e?= , david@gibson.dropbear.id.au Subject: [Qemu-devel] [PATCH v2 14/15] docker: Support interactive shell for debugging X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org Sender: qemu-devel-bounces+patchwork-qemu-devel=patchwork.kernel.org@nongnu.org X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP Specify "PAUSE=1" when invoking make docker-%, and a shell prompt will show up before the test runs. Signed-off-by: Fam Zheng --- tests/docker/Makefile.include | 5 ++++- tests/docker/run | 8 ++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/tests/docker/Makefile.include b/tests/docker/Makefile.include index d8c55c3..aaf7d23 100644 --- a/tests/docker/Makefile.include +++ b/tests/docker/Makefile.include @@ -60,6 +60,8 @@ docker: @echo ' TESTS="x y z .." Filters which tests to run (for docker-test).' @echo ' J=[0..9]* Overrides the -jN parameter for make commands' @echo ' (default is 1)' + @echo ' PAUSE=1 Stop and drop to shell in the created container' + @echo ' before running the command.' docker-image-%: @if test -z "$(IMAGE)"; then echo "Invalid target"; exit 1; fi @@ -79,9 +81,10 @@ docker-run-%: $(call quiet-command,\ $(SRC_PATH)/tests/docker/docker_run $(if $(KEEP),,--rm) \ --privileged -t --net=none \ + $(if $(PAUSE),-i) \ -v $$(realpath $(SRC_PATH)):/var/tmp/qemu \ -e QEMU_SRC=/var/tmp/qemu \ - -e V=$V -e J=$J \ + -e V=$V -e J=$J -e PAUSE=$(PAUSE)\ -v /var/tmp/qemu-docker-ccache:/var/tmp/ccache \ -e CCACHE_DIR=/var/tmp/ccache \ qemu:$(IMAGE) \ diff --git a/tests/docker/run b/tests/docker/run index 55b2737..cc8d246 100755 --- a/tests/docker/run +++ b/tests/docker/run @@ -23,4 +23,12 @@ if test -n "$J"; then fi cd $QEMU_SRC/tests/docker + +if test -n "$PAUSE"; then + echo "* Prepared to run command:" + echo " $@" + echo "* Hit Ctrl-D to continue, or type 'exit 1' to quit" + echo + $SHELL +fi "$@"