summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-01-09analysis queries serve test: Extend to check we can install served targetPaul Cristian Sarbu
2024-01-09test end-to-end: Check that serve endpoint correctly dispatches buildsPaul Cristian Sarbu
2024-01-09Refactor GraphTraverser to take in platform properties and dispatch listPaul Cristian Sarbu
In order for the serve endpoint to correctly dispatch a build to the correct remote-execution endpoint, the platform properties and dispatch list for a build need to be passed explicitly to the executor (via the graph traverser instance) instead of always being taken from the RemoteExecutionConfig struct. This commit implements these changes, including updating existing tests accordingly.
2024-01-09test end-to-end: Fix 'dispatch' mising from list of tests runPaul Cristian Sarbu
2023-12-21BazelCasClient::DoUploadBlobs: returns the count of the uploaded blobs...Alberto Sartori
...instead of the vector containing the digests of the uploaded blobs. The returned vector was never inspected by the callers, except for its size. The tests have been accordingly amended.
2023-12-20test: Serve endpoint provides tc value for cache missesPaul Cristian Sarbu
During the analysis of export targets, if there is a local target cache miss, we should also interrogate the serve endpoint (if given) for the target cache value before proceeding with the analysis. For this test we have extended the "with_serve" runner to expose also the remote-execution build root to the test env.
2023-12-20Add end-to-end test serving a tree target from an archive rootKlaus Aehlig
2023-12-19test: Extend general just-mr check to test each repository tooPaul Cristian Sarbu
This way we ensure each repository can be set up on its own and nothing gets cached from other repositories, as opposed to the parallel run where some caching is expected to occur.
2023-12-14just analyse: support dumping the provides map of a targetKlaus Aehlig
2023-12-12test: Check tc sharding if 'just serve' acts also as 'just execute'Paul Cristian Sarbu
2023-12-12Tests: Verify copy overwrite of symlink with fileOliver Reiche
2023-12-11just-mrrc: support file options for the launcher functionalityKlaus Aehlig
When just-mr acts as a launcher, for most subcommand options the "just args" entry in the rc files provides a convenient way to set them. However, some options take a file as argument; for those it can be desirable to set them without assuming a fixed file-system layout and instead refer to logical roots, in particular the work space. for the ones that refer to files, it is often desirable to have a potential reference to the work space. Add this functionality.
2023-12-07test: Check --fetch-absent option for 'git tree' repositoriesPaul Cristian Sarbu
2023-12-07test rule with_serve: Pass also the commit trees to the test scriptPaul Cristian Sarbu
2023-12-07test: Check 'git tree' fetch from remote execution and --backup-to-remotePaul Cristian Sarbu
2023-12-06install-cas cli: Remove remote execution properties and dispatch file...Paul Cristian Sarbu
...options from the generated help messages, as these are not used for the install-cas subcommand. This also updates the man page accordingly, where the dispatch file was marked as supported, as well as update any test affected by these changes.
2023-12-05test: Check remote build via just servePaul Cristian Sarbu
2023-11-27Refactoring RepositoryConfigPaul Cristian Sarbu
With the introduction of 'just serve', export targets can now be built also independently from one another based on their corresponding minimal repository configuration, as stored in the target cache key. In this context, this commit changes the RepositoryConfig usage from one global (static) instance to pointers passed as necessary throughout the code.
2023-11-22test: Check staging of empty treesOliver Reiche
2023-11-22Add test case for blob splittingSascha Roloff
2023-11-22Implement blob splitting protocol on just client sideSascha Roloff
2023-11-22Test ["end-to-end/gc", "export"]: fix workspace layoutKlaus Aehlig
This end-to-end test, of course, depends on the tools, provided inside the test's working directory. The test, being end to end, constructs a workspace with multi-repository configuration with the main repo a file repsoitory at the root of the constructed work space; to be able to test exporting this repository has pragma "to_git". Move the constructed work space to sub directory to not include the tools to be tested in the work space that is gitified; one the one hand, the tested tools should not be part of the test workspace and on the other hand, this shaves off a large fraction of the test's run time.
2023-11-21test: Verify fetching from just serve of absent distdir archivesPaul Cristian Sarbu
2023-11-21Extend --fetch-absent tests to verify regular fetching from just serveKlaus Aehlig
Whenever a just-serve endpoint is given, fetching archives or Git commits from there is preferrable to fetching them from other sources. Verify in the tests that this actually happens. Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
2023-11-16test: Check that serve service works in compatible modePaul Cristian Sarbu
Added compatibility envariable to the with_serve rule, guarded tests using --fetch-absent such that they run only in native mode, and made all serve-service tests aware of the compatibility flag.
2023-11-16remote-execution-endpoint: fall back to remote-serve-endpointAlberto Sartori
If only the `--remote-serve-endpoint` option is specified on the command line, the `--remote-execution-endpoint` is also set to the given value. This makes the spawning and usage of just-execute consistent. When just-serve is started, if no remote execution endpoint is provided, the same process will also act as a just-execute instance. With the current patch, the client can thus only write, on command line, the remote serve address, avoiding the repetition of the same address for two different options.
2023-11-16end-to-end serve-target-cache-hit: test the failure if...Alberto Sartori
...the client and serve use two different remote execution endpoints fixup test
2023-11-15just-serve: add end-to-end testsAlberto Sartori
serve_target_remote_build.sh should be updated once just-serve can orchestrate the remote build
2023-11-15test end-to-end: Expose the serve build root in the test environmentPaul Cristian Sarbu
This will allow end-to-end tests to pre-populate the serve build root if needed.
2023-11-15test end-to-end: Cleanup of with_serve runner Python scriptPaul Cristian Sarbu
2023-11-15define AbsentTargetMap for handling export targets in absent repositoriesAlberto Sartori
2023-11-15FileRoot: Add new absent root underlying type variantPaul Cristian Sarbu
Absent roots are characterised only by a Git tree hash, so a new variant of the underlying stored information was added in the form of a plain string. In order to avoid unwanted implicit conversions when instantiating via literal strings, we force callers of the constructors to explicitly differentiate between plain strings and filesystem paths. Existing tests were updated to reflect this. Co-authored-by: Alberto Sartori <alberto.sartori@huawei.com>
2023-11-15artifact.hpp: make ToJson and FromJson consistentAlberto Sartori
The function ToJson used `file_type` key to express the type of the artifact, on the other hand, FromJson was expecting `type`. This patch makes the two functions consistent, prefering `file_type` for historical reasons.
2023-11-15test ["end-to-end/just-mr", "git-tree-env"]: fix negative test conditionKlaus Aehlig
This test was only working by accident, as the missing target specification ["", "sources.txt"] was making the build fail, not the (supposedly) unset variable. Fix this by looking only at the setup command and expect failure there---and also unset the correct variable.
2023-11-15git tree repository: Creating absent roots should not run the commandPaul Cristian Sarbu
Also extended absent-roots test with this scenario.
2023-11-14test: Set a fixed number of retries for starting Python servers...Paul Cristian Sarbu
...to avoid waiting for the test timeout on an internal error.
2023-11-14test: Fetch from mirrors given in just's specification filePaul Cristian Sarbu
2023-11-14curl_url_handle: Add method to replace the hostname of a URLPaul Cristian Sarbu
Also adds a section in the curl_url test suite.
2023-11-14test: Add check for 'mirrors' field in just-mr repositoriesPaul Cristian Sarbu
2023-11-13test: Verify unlink of symlinksOliver Reiche
2023-11-13Add end-to-end test for environment handling of "git tree" repositoriesKlaus T. Aehlig
... ensuring that just-mr passes on the specified environment variables (and only those) to the tree-generating action.
2023-11-02just-mr fetch: Add handling of --fetch-absent optionPaul Cristian Sarbu
2023-11-02test: Add simple check that 'just serve' resolves symlinks as expectedPaul Cristian Sarbu
2023-11-02serve test runner: Fix style and missing counter incrementPaul Cristian Sarbu
2023-11-02Add end-to-end test for fetching absent archivesKlaus Aehlig
Includes check to ensure we do not cache subtrees unnecessarily. Co-authored-by: Paul Cristian Sarbu <paul.cristian.sarbu@huawei.com>
2023-11-02just serve: Fix inconsistenciesPaul Cristian Sarbu
- add missing serve_api TARGETS file - rename service client to align with server naming scheme - fix inconsistencies in comments between implementation and protocol
2023-11-02ArchiveOps: Move libarchive utilities outside other_toolsPaul Cristian Sarbu
This way they can be used by 'just serve'.
2023-11-02GitRepo: Add method for async fetch from local repositoryPaul Cristian Sarbu
This avoids using the more geenric GitRepoRemote method which has libcurl as a dependency, something that is not needed for this Git operation.
2023-11-02bootstrap: Add libarchive dependencyPaul Cristian Sarbu
This is brought in by the tree-of-archive rpc of just serve. Also adds lzma and bzip2 as transitive dependencies.
2023-10-27Add a test for similar but different exportsKlaus Aehlig
Export the same target from different repositories, as well as an explicit file reference with the same name and verify that no spourious cache hits occur.