summaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2024-02-26Add split-splice end-to-end testSascha Roloff
2024-02-22Add test verifying error reporting on failing actionsKlaus Aehlig
Add an end-to-end test verifying that we report enough useful information in case of an action failing.
2024-02-21Add test verifying the annotations added by just-import-gitKlaus Aehlig
... i.e., the values for "mirror" and "inherit env"
2024-02-20Add test verifying that "inherit env" is honored for git fetchesKlaus Aehlig
2024-02-20git repo fetch: support "inherit env"Klaus Aehlig
When fetching git repositories, just-mr routinely shells out to git. In this case, allow the user to specify via "inherit env", which environment variables from the host environment should be made available in this action. Typical variables to inherit are ones providing credentials, like SSH_AUTH_SOCK. As the repository description specifies the commit that will be taken, and hence the resulting tree, correctness is not affected by the environement leaking in here.
2024-02-15absent-archives test: also verify fetching as distfileKlaus Aehlig
2024-02-13with-serve test runner: do not rely on readdir orderKlaus Aehlig
2024-02-13executor-api test: also set env for echoKlaus Aehlig
... in order to not rely on the default launcher to pull it in.
2024-02-13local-execution test: set launcherKlaus Aehlig
... to not rely on env implicitly pulling in echo to PATH.
2024-02-13execution-api test: also set the launcherKlaus Aehlig
... in order to not assume echo to be on the standard search path pulled in by env.
2024-02-13Add test that also for trees in the git cas we can follow pathsKlaus Aehlig
For a user `just install-cas` will show an entry without revealing where it found it---as it is content-addressable, it does not matter. Therefore, verify that accessing paths of a tree object also works regardless of where the tree is stored.
2024-02-07graph_traverser test: provide env trough launcherKlaus T. Aehlig
... instead of hard-coding it in the example graphs. In this way, we can honor a provided PATH.
2024-02-07executor tests: only use hard-coded paths if no PATH is providedKlaus T. Aehlig
2024-02-07execution-api tests: provide PATH where neededKlaus T. Aehlig
... to make tests pass also on systems where /bin/sh does not, by default, pull in a path to "the standard tools".
2024-02-05end-to-end tests: compare json values with jqKlaus T. Aehlig
... and only let test do the check on the final resulting boolean, where the string representation is canonical. In this way, we avoid having to rely on the string representation of numbers, where, e.g., 1 and 1.0 are equally valid representations of the same number.
2024-02-05end-to-end tests with remote (and serve) endpoint: inhert PATHKlaus T. Aehlig
... in the local launcher for the execution end point. In this way, the tests also work on systems where sh does not pull in enough paths to have all the "usual" tools available. To also get a correct path on systems relying on sh pulling in enough paths, take what sh, launched with the default launcher, would believe the path is.
2024-02-05end-to-end tests: inherit pathKlaus T. Aehlig
... for test actions, by setting an appropriate local launcher. In this way, the tests can also be run on systems where sh does not pull in enough paths to have all the "usual" tools available.
2024-02-01Add end-to-end test describing absent export targetsKlaus Aehlig
2024-01-31just-mr: Failure in serve api root tree requests should be fatalPaul Cristian Sarbu
The requests to retrieve the tree of a commit, archive, or distdir also set up those trees in a way that the serve endpoint can later build against them, besides allowing just-mr to set up roots locally. Therefore, if the witnessing entity (Git commit, content blob, or distdir, respectively) is known to the serve endpoint, then failing to set up the root tree there should result in a failure also of the just-mr setup on the client side.
2024-01-31serve source tree: Increase server-side granularity in response statusesPaul Cristian Sarbu
For archives and Git repositories we should ensure that not finding the witnessing entity (archive content blob or Git commit, respectively) results in a distinct status in the response to a request that sets up roots on the serve endpoint. This will allow just-mr to better handle its interaction with the serve endpoint.
2024-01-31test absent-roots: Serve-endpoint build root must not be removedPaul Cristian Sarbu
A change made to this test was wrongly setting the same path both as build root for the serve instance and for the just-mr instances being tested, resulting in the build root of the serve instance being inadvertently removed during the test. This commit fixes the issue by giving the serve endpoint its own build root path.
2024-01-30Add library for overlaying just-mr rcsKlaus Aehlig
2024-01-26serve tree test: Extend to check the absent roots syncPaul Cristian Sarbu
2024-01-26serve tree test: extend to use a separate target rootKlaus Aehlig
2024-01-24Add a test verifying that just-mr reports the correct tool namesKlaus Aehlig
... regardless of the names chosen during packaging.
2024-01-24just: Wrap IExecutionApi raw pointer argumentsPaul Cristian Sarbu
...in accordance to our coding style.
2024-01-22tests: Run mirror tests for fetch and setupOliver Reiche
2024-01-19Add test case to check tree invariant in just executeSascha Roloff
2024-01-16Add a test verifying the interaction between tc and gcKlaus Aehlig
Add a test that verifies that garbage collection does not violate the invariants required by the extensional project implicit in target-level caching.
2024-01-16Analysed target: keep track of implied export targetsKlaus Aehlig
... that are eligible for caching. In this way, we can accurately keep track of the dependencies between target-level cache entries. Note that it is enough to track the export targets eligible for caching, as no target depending on an ineligible export target can be eligible.
2024-01-12end-to-end tests: wait longer for test servicesKlaus Aehlig
Certain end-to-end tests require custom services. While normally they come up in quickly (less than 2 seconds), on heavily overloaded machines it might take longer. So increase the amount of time these tests are willing to wait for the binary to start up to avoid flakyness in our CI runs.
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