Skip to content

Commit

Permalink
tests: create an EdenFS-Sapling-Mononoke e2e test
Browse files Browse the repository at this point in the history
Reviewed By: quark-zju

Differential Revision: D64330209

fbshipit-source-id: 5fdabc4641e64e481491b606f0c8a84654835f58
  • Loading branch information
sggutier authored and facebook-github-bot committed Oct 18, 2024
1 parent abcf372 commit 60f24c9
Show file tree
Hide file tree
Showing 2 changed files with 77 additions and 0 deletions.
46 changes: 46 additions & 0 deletions eden/scm/tests/TARGETS
Original file line number Diff line number Diff line change
Expand Up @@ -231,6 +231,52 @@ python_unittest(
deps = ["//libfb/py:parutil"],
)

MEW_ENV = dict(EW_ENV)

MEW_ENV["USE_MONONOKE"] = "1"

MEW_ENV["HGTEST_MONONOKE_SERVER"] = "$(location //eden/mononoke:mononoke)"

MEW_ENV["HGTEST_GET_FREE_SOCKET"] = "$(location //eden/mononoke/tests/integration:get_free_socket)"

MEW_ENV["HGTEST_CERTDIR"] = "$(location //eden/mononoke/tests/integration/certs/facebook:test_certs)"

MEW_ENV.pop("HGTEST_EXCLUDED")

MEW_ENV.pop("HGTEST_BLOCKLIST")

MEW_ENV["HGTEST_INCLUDED"] = "test_(e2e_clone)_t"

MEW_ENV["TEST_FIXTURES"] = "$(location //eden/mononoke/tests/integration:test_fixtures)"

MEW_ENV["JUST_KNOBS_DEFAULTS"] = "$(location //eden/mononoke/mononoke_macros:just_knobs_defaults)"

MEW_ENV["FB_TEST_FIXTURES"] = "$(location //eden/mononoke/tests/integration/facebook:facebook_test_fixtures)"

python_unittest(
name = "trinity_tests",
srcs = SRCS,
compatible_with = [
"ovr_config//os:linux",
],
env = MEW_ENV,
resources = {
"//eden/mononoke/tests/integration/certs/facebook:test_certs": "certs",
"//eden/mononoke/tests/integration:get_free_socket": "get_free_socket.par",
"//eden/mononoke:mononoke": "mononoke",
"//eden/scm/tests:dummyssh3": "dummyssh3.par",
"//eden/scm:hg_test": "hg.sh",
"//eden/scm:hgpython_test": "hgpython.sh",
"//watchman:watchman": "watchman",
},
supports_static_listing = False,
runtime_deps = artifacts["deps"] + [
"//eden/mononoke/tests/integration/certs/facebook:test_certs",
"//eden/mononoke/tests/integration:test_fixtures",
],
deps = ["//libfb/py:parutil"],
)

buck_filegroup(
name = "test_runner",
srcs = [
Expand Down
31 changes: 31 additions & 0 deletions eden/scm/tests/test-e2e-clone.t
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
#require mononoke
#require eden

$ setconfig checkout.use-rust=true
$ setconfig clone.use-rust=true
$ setconfig experimental.nativecheckout=true

$ newclientrepo repo1
$ drawdag <<'EOS'
> A # A/foo = foo
> # A/bar = bar
> EOS
$ hg push -r $A --to master --create -q
$ newclientrepo repo2 "mononoke://$(mononoke_address)/repo1"
$ cd "$TESTTMP/repo2"
$ eden list
$TESTTMP/repo1
$TESTTMP/repo2



Quick check for making sure this test is capable of using EdenFS
$ ls -a $TESTTMP/.eden-backing-repos
repo1

$ ls -a
.eden
.hg
A
bar
foo

0 comments on commit 60f24c9

Please sign in to comment.