forked from salesforce/p4-fusion
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathruntest.sh
More file actions
executable file
·86 lines (64 loc) · 1.99 KB
/
Copy pathruntest.sh
File metadata and controls
executable file
·86 lines (64 loc) · 1.99 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
#!/usr/bin/env bash
# Running this test:
# Provide a P4PORT, P4USER, P4PASSWD and P4CLIENT variable.
# Next, pick a path in the depot you want to test against, and pass it to
# p4-fusion.
# Create a client that points to ./verify/p4datadir with the option rmdir
# enabled.
# This is my client spec:
# Client: erik-git-p4
# Update: 2023/10/17 02:47:03
# Access: 2023/10/17 03:02:48
# Owner: admin
# Description:
# Used by Erik to ingest repos.
# Root: /Users/erik/Code/sourcegraph/p4-fusion/verify/p4datadir
# # Note!!! The rmdir option here is very important!
# Options: noallwrite noclobber nocompress unlocked nomodtime rmdir
# SubmitOptions: submitunchanged
# LineEnd: local
# View:
# //source/src-cli/... //erik-git-p4/...
set -euo pipefail
ROOT="$(dirname "${BASH_SOURCE[0]}")"
rm -f "${ROOT}/verify/p4fusion.log"
rm -rf "${ROOT}/verify/gitout"
rm -rf "${ROOT}/verify/p4home"
rm -rf "${ROOT}/verify/datadir"
rm -rf "${ROOT}/verify/p4datadir"
mkdir -p "${ROOT}/verify/gitout"
mkdir -p "${ROOT}/verify/p4home"
mkdir -p "${ROOT}/verify/datadir"
mkdir -p "${ROOT}/verify/p4datadir"
# Enable test output that helps this script understand what was written.
export PRINT_TEST_OUTPUT=true
./generate_cache.sh Debug
./build.sh
export P4USER=<PROVIDE_ME>
export P4PORT=<PROVIDE_ME>
export P4PASSWD=<PROVIDE_ME>
export HOME=./verify/p4home
./build/p4-fusion/p4-fusion \
--path //source/src-cli/... \
--client '' \
--user admin \
--src "${ROOT}/verify/gitout" \
--networkThreads 64 \
--port <PROVIDE_ME> \
--lookAhead 15000 \
--printBatch 1000 \
--noBaseCommit true \
--retries 10 \
--refresh 1000 \
--maxChanges -1 \
--includeBinaries true \
--fsyncEnable true \
--noColor true 2>&1 | tee ./verify/p4fusion.log
export P4CLIENT=<PROVIDE_ME>
./validate-migration.sh \
--force \
--debug \
--logfile="${ROOT}/verify/p4fusion.log" \
--p4workdir="${ROOT}/verify/p4datadir" \
--gitdir="${ROOT}/verify/gitout" \
--datadir="${ROOT}/verify/datadir"