From: Miguel Torroja <miguel.torroja@gmail.com>
To: Luke Diamand <luke@diamand.org>, Git Users <git@vger.kernel.org>,
Junio C Hamano <gitster@pobox.com>
Cc: Lars Schneider <larsxschneider@gmail.com>,
Miguel Torroja <miguel.torroja@gmail.com>
Subject: [PATCH 1/3] git-p4: git-p4 tests with p4 triggers
Date: Thu, 13 Jul 2017 09:00:33 +0200 [thread overview]
Message-ID: <20170713070035.12731-1-miguel.torroja@gmail.com> (raw)
In-Reply-To: <xmqqr2xl1suy.fsf@gitster.mtv.corp.google.com>
Some p4 triggers in the server side generate some warnings when
executed. Unfortunately those messages are mixed with the output of
p4 commands. A few git-p4 commands don't expect extra messages or output
lines and may fail with verbose triggers.
New tests added are known to be broken.
Signed-off-by: Miguel Torroja <miguel.torroja@gmail.com>
---
t/t9831-git-p4-triggers.sh | 103 +++++++++++++++++++++++++++++++++++++++++++++
1 file changed, 103 insertions(+)
create mode 100755 t/t9831-git-p4-triggers.sh
diff --git a/t/t9831-git-p4-triggers.sh b/t/t9831-git-p4-triggers.sh
new file mode 100755
index 000000000..28cafe469
--- /dev/null
+++ b/t/t9831-git-p4-triggers.sh
@@ -0,0 +1,103 @@
+#!/bin/sh
+
+test_description='git p4 with server triggers'
+
+. ./lib-git-p4.sh
+
+test_expect_success 'start p4d' '
+ start_p4d
+'
+
+test_expect_success 'init depot' '
+ (
+ cd "$cli" &&
+ echo file1 >file1 &&
+ p4 add file1 &&
+ p4 submit -d "change 1"
+ echo file2 >file2 &&
+ p4 add file2 &&
+ p4 submit -d "change 2"
+ )
+'
+
+test_expect_failure 'clone with extra info lines from verbose p4 trigger' '
+ test_when_finished cleanup_git &&
+ (
+ p4 triggers -i <<-EOF
+ Triggers: p4triggertest-command command pre-user-change "echo verbose trigger"
+ EOF
+ ) &&
+ (
+ p4 change -o | grep -s "verbose trigger"
+ ) &&
+ git p4 clone --dest="$git" //depot/@all &&
+ (
+ p4 triggers -i <<-EOF
+ Triggers:
+ EOF
+ )
+'
+
+test_expect_failure 'import with extra info lines from verbose p4 trigger' '
+ test_when_finished cleanup_git &&
+ (
+ cd "$cli" &&
+ echo file3 >file3 &&
+ p4 add file3 &&
+ p4 submit -d "change 3"
+ ) &&
+ (
+ p4 triggers -i <<-EOF
+ Triggers: p4triggertest-command command pre-user-describe "echo verbose trigger"
+ EOF
+ ) &&
+ (
+ p4 describe 1 | grep -s "verbose trigger"
+ ) &&
+ git p4 clone --dest="$git" //depot/@all &&
+ (
+ cd "$git" &&
+ git p4 sync
+ )&&
+ (
+ p4 triggers -i <<-EOF
+ Triggers:
+ EOF
+ )
+'
+
+test_expect_failure 'submit description with extra info lines from verbose p4 change trigger' '
+ test_when_finished cleanup_git &&
+ (
+ p4 triggers -i <<-EOF
+ Triggers: p4triggertest-command command pre-user-change "echo verbose trigger"
+ EOF
+ ) &&
+ (
+ p4 change -o | grep -s "verbose trigger"
+ ) &&
+ git p4 clone --dest="$git" //depot &&
+ (
+ cd "$git" &&
+ git config git-p4.skipSubmitEdit true &&
+ echo file4 >file4 &&
+ git add file4 &&
+ git commit -m file4 &&
+ git p4 submit
+ ) &&
+ (
+ p4 triggers -i <<-EOF
+ Triggers:
+ EOF
+ ) &&
+ (
+ cd "$cli" &&
+ test_path_is_file file4
+ )
+'
+
+test_expect_success 'kill p4d' '
+ kill_p4d
+'
+
+test_done
--
2.11.0
next prev parent reply other threads:[~2017-07-13 7:01 UTC|newest]
Thread overview: 31+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-06-20 12:19 [PATCH] git-p4: changelist template with p4 -G change -o Miguel Torroja
2017-06-22 17:32 ` Junio C Hamano
2017-06-24 11:49 ` Luke Diamand
2017-06-24 12:38 ` miguel torroja
2017-06-24 17:36 ` Lars Schneider
[not found] ` <CAKYtbVbGekXGAyPd7HeLot_MdZkp7-1Ss-iAi7o8ze2b+sNB6Q@mail.gmail.com>
2017-06-27 9:20 ` miguel torroja
2017-06-27 19:17 ` [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes Miguel Torroja
2017-06-28 4:08 ` Junio C Hamano
2017-06-28 9:54 ` Luke Diamand
2017-06-28 13:14 ` miguel torroja
[not found] ` <CAE5ih7-x45MD1H6Ahr5oCVtTjgbBkeP4GbKCGB-Cwk6BSQwTcw@mail.gmail.com>
2017-06-29 22:41 ` miguel torroja
2017-06-30 7:56 ` Luke Diamand
2017-06-30 8:22 ` miguel torroja
2017-06-29 22:46 ` Miguel Torroja
2017-06-30 8:26 ` Lars Schneider
2017-06-30 9:41 ` Miguel Torroja
2017-06-30 10:13 ` Lars Schneider
2017-06-30 16:02 ` Miguel Torroja
2017-07-03 22:53 ` Miguel Torroja
2017-07-03 22:57 ` Miguel Torroja
2017-07-11 8:35 ` Luke Diamand
2017-07-11 22:35 ` Miguel Torroja
2017-07-11 22:53 ` Miguel Torroja
2017-07-12 8:25 ` Luke Diamand
2017-07-12 10:16 ` Miguel Torroja
2017-07-12 17:13 ` Junio C Hamano
2017-07-13 7:00 ` Miguel Torroja [this message]
2017-07-13 7:00 ` [PATCH 2/3] " Miguel Torroja
2017-07-13 7:00 ` [PATCH 3/3] git-p4: filter for {'code':'info'} in p4CmdList Miguel Torroja
2017-07-13 7:12 ` [PATCH] git-p4: parse marshal output "p4 -G" in p4 changes Miguel Torroja
2017-07-13 19:30 ` Junio C Hamano
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
List information: http://vger.kernel.org/majordomo-info.html
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20170713070035.12731-1-miguel.torroja@gmail.com \
--to=miguel.torroja@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=larsxschneider@gmail.com \
--cc=luke@diamand.org \
/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
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://80x24.org/mirrors/git.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).