3 test_description
='git p4 retrieve job info'
5 TEST_PASSES_SANITIZE_LEAK
=true
8 test_expect_success
'start p4d' '
12 test_expect_success
'add p4 jobs' '
14 p4_add_job TESTJOB-A &&
19 test_expect_success
'add p4 files' '
20 client_view "//depot/... //client/..." &&
25 p4 submit -d "Add file 1"
29 test_expect_success
'check log message of changelist with no jobs' '
30 client_view "//depot/... //client/..." &&
31 test_when_finished cleanup_git &&
35 git p4 clone --use-client-spec --destination="$git" //depot@all &&
36 cat >expect <<-\EOF &&
38 [git-p4: depot-paths = "//depot/": change = 1]
41 git log --format=%B >actual &&
42 test_cmp expect actual
46 test_expect_success
'add TESTJOB-A to change 1' '
53 test_expect_success
'check log message of changelist with one job' '
54 client_view "//depot/... //client/..." &&
55 test_when_finished cleanup_git &&
59 git p4 clone --use-client-spec --destination="$git" //depot@all &&
60 cat >expect <<-\EOF &&
63 [git-p4: depot-paths = "//depot/": change = 1]
66 git log --format=%B >actual &&
67 test_cmp expect actual
71 test_expect_success
'add TESTJOB-B to change 1' '
78 test_expect_success
'check log message of changelist with more jobs' '
79 client_view "//depot/... //client/..." &&
80 test_when_finished cleanup_git &&
84 git p4 clone --use-client-spec --destination="$git" //depot@all &&
85 cat >expect <<-\EOF &&
87 Jobs: TESTJOB-A TESTJOB-B
88 [git-p4: depot-paths = "//depot/": change = 1]
91 git log --format=%B >actual &&
92 test_cmp expect actual