git-repo/tests
Raman Tenneti ceba2ddc13 sync: superproject - support for switching hosts and switching branches.
+ superproject will be fetched into a directory with the name
  “<remote name>-superproject.git” instead of the current
  “superproject.git” folder.

+ Deleted  _Clone method and added _Init method.

+ _Init method will do “git init --bare <remote>-superproject.git”.
  It will create the folder and set up a bare repository in
  <remote>-superproject.git folder.

+ _Fetch method, will pass <remote url>, <branch> arguments.
  Moved the --filter argument from “git clone” to “git fetch”.
  _Fetch method will execute the following command to fetch
  superproject. Added --no-tags argument.

  master:  git fetch <remote url> --force --no-tags --filter blob:none
  branch:  git fetch <remote url> --force --no-tags --filter blob:none \
           <branch>:<branch>

+ Performance improvements for aosp-master
  ++ repo init performance improved from 35 seconds to 17 seconds.
  ++ repo init --use-superproject is around 5 to 7 secsonds slower.
  ++ repo sync --use-superproject is around 3 to 4 minutes faster.

Tested the code with the following commands.

$ ./run_tests -v

Tested the sync code by using repo_dev alias and pointing to this CL.

$ time repo_dev init -u sso://android.git.corp.google.com/platform/manifest -b master --partial-clone --clone-filter=blob:limit=10M --repo-rev=main --use-superproject
...
  real	0m20.648s
  user	0m8.046s
  sys	0m3.271s

+ Without superproject
$ time repo init -u sso://android.git.corp.google.com/platform/manifest -b master --partial-clone --clone-filter=blob:limit=10M --repo-rev=main
  real	0m13.078s
  user	0m9.783s
  sys	0m2.528s

$ time repo_dev sync -c -j32 --use-superproject
...
  real	15m7.072s
  user	110m7.216s
  sys	20m17.559s

+ Without superproject
$ time repo sync -c -j32
...
  real	19m25.644s
  user	91m56.331s
  sys	20m59.170s

Bug: [google internal] b/180492484
Bug: [google internal] b/179470886
Bug: [google internal] b/180124069
Bug: https://crbug.com/gerrit/13709
Bug: https://crbug.com/gerrit/13707

Change-Id: Ib04bd7f1e25ceb75532643e58ad0129300ba3299
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/297702
Reviewed-by: Mike Frysinger <vapier@google.com>
Tested-by: Raman Tenneti <rtenneti@google.com>
2021-02-25 20:45:26 +00:00
..
fixtures git_config: add GetInt helper 2020-02-19 23:09:05 +00:00
test_editor.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_error.py error: fix pickling of all exceptions 2021-02-19 20:06:03 +00:00
test_git_command.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_git_config.py git_config: add SetBoolean helper 2021-02-11 01:48:12 +00:00
test_git_superproject.py sync: superproject - support for switching hosts and switching branches. 2021-02-25 20:45:26 +00:00
test_git_trace2_event_log.py Update "evt" field to be logged as a string type. 2021-01-19 20:35:56 +00:00
test_hooks.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_manifest_xml.py tests: refactor manifest tests 2021-02-25 17:06:56 +00:00
test_project.py strip python2-only coding:utf-8 & print_function settings 2021-01-06 18:53:05 +00:00
test_subcmds_init.py tests: fix init subcmd after url change 2021-02-25 17:07:11 +00:00
test_subcmds.py init: reject unknown args 2020-09-02 07:53:16 +00:00
test_wrapper.py launcher: add a requirements framework to declare version dependencies 2021-01-19 16:48:21 +00:00