Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 0 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,5 +29,3 @@ jobs:

- run: opam install . --deps-only --with-test
- run: opam exec -- make


13 changes: 9 additions & 4 deletions src/tests/utils.ml
Original file line number Diff line number Diff line change
Expand Up @@ -94,19 +94,24 @@ let read_config path =
if not (OpamFilename.exists_dir path) then
OpamConsole.error_and_exit `Configuration_error
"opam-rt has not been initialized properly";
let repos = OpamFile.Repos_config.read (repos_config_file path) in
let repos =
OpamFile.Repos_config.repos
(OpamFile.Repos_config.read (repos_config_file path))
in
let repo_name = base_repo_name in
let opam_root = path / "opam" in
let repo_root = path / "repo" in
let repo_url, _repo_trust =
let {OpamFile.Repo_config.url = repo_url; _} =
OpamRepositoryName.Map.find repo_name repos
in
let contents_root = path / "contents" in
{ repo_name; repo_root; repo_url; opam_root; contents_root }

let write_repo_config path repo_name repo_url =
let write_repo_config path repo_name (repo_url, repo_trust) =
OpamFile.Repos_config.write (repos_config_file path)
(OpamRepositoryName.Map.singleton repo_name repo_url)
(OpamFile.Repos_config.create
(OpamRepositoryName.Map.singleton repo_name
(OpamFile.Repo_config.create ?trust:repo_trust repo_url)))


(** Init *)
Expand Down
Loading