Compare commits
8 Commits
eval-jobse
...
compiler-w
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2dad87ad89 | ||
|
|
b6f44b5cd0 | ||
|
|
c8b7a0fea9 | ||
|
|
2d79b0a4da | ||
|
|
0ead8dc65c | ||
|
|
02a514234b | ||
|
|
54a9729a0f | ||
|
|
250780aaf2 |
@@ -1,6 +1,6 @@
|
|||||||
# The `default.nix` in flake-compat reads `flake.nix` and `flake.lock` from `src` and
|
# The `default.nix` in flake-compat reads `flake.nix` and `flake.lock` from `src` and
|
||||||
# returns an attribute set of the shape `{ defaultNix, shellNix }`
|
# returns an attribute set of the shape `{ defaultNix, shellNix }`
|
||||||
|
|
||||||
(import (fetchTarball https://github.com/edolstra/flake-compat/archive/master.tar.gz) {
|
(import (fetchTarball "https://github.com/edolstra/flake-compat/archive/master.tar.gz") {
|
||||||
src = ./.;
|
src = ./.;
|
||||||
}).defaultNix
|
}).defaultNix
|
||||||
|
|||||||
@@ -15,12 +15,18 @@ and dependencies can be found:
|
|||||||
$ nix-shell
|
$ nix-shell
|
||||||
```
|
```
|
||||||
|
|
||||||
|
of when flakes are enabled:
|
||||||
|
|
||||||
|
```console
|
||||||
|
$ nix develop
|
||||||
|
```
|
||||||
|
|
||||||
To build Hydra, you should then do:
|
To build Hydra, you should then do:
|
||||||
|
|
||||||
```console
|
```console
|
||||||
[nix-shell]$ autoreconfPhase
|
[nix-shell]$ autoreconfPhase
|
||||||
[nix-shell]$ configurePhase
|
[nix-shell]$ configurePhase
|
||||||
[nix-shell]$ make
|
[nix-shell]$ make -j$(nproc)
|
||||||
```
|
```
|
||||||
|
|
||||||
You start a local database, the webserver, and other components with
|
You start a local database, the webserver, and other components with
|
||||||
|
|||||||
@@ -164,7 +164,7 @@ void State::parseMachines(const std::string & contents)
|
|||||||
? string2Int<MaxJobs>(tokens[3]).value()
|
? string2Int<MaxJobs>(tokens[3]).value()
|
||||||
: 1,
|
: 1,
|
||||||
// `speedFactor`
|
// `speedFactor`
|
||||||
atof(tokens[4].c_str()),
|
std::stof(tokens[4].c_str()),
|
||||||
// `supportedFeatures`
|
// `supportedFeatures`
|
||||||
std::move(supportedFeatures),
|
std::move(supportedFeatures),
|
||||||
// `mandatoryFeatures`
|
// `mandatoryFeatures`
|
||||||
|
|||||||
@@ -54,13 +54,14 @@ subtest "/job/PROJECT/JOBSET/JOB/shield" => sub {
|
|||||||
|
|
||||||
subtest "/job/PROJECT/JOBSET/JOB/prometheus" => sub {
|
subtest "/job/PROJECT/JOBSET/JOB/prometheus" => sub {
|
||||||
my $response = request(GET '/job/' . $project->name . '/' . $jobset->name . '/' . $build->job . '/prometheus');
|
my $response = request(GET '/job/' . $project->name . '/' . $jobset->name . '/' . $build->job . '/prometheus');
|
||||||
ok($response->is_success, "The page showing the job's prometheus data returns 200.");
|
|
||||||
my $metrics = $response->content;
|
|
||||||
|
|
||||||
ok($metrics =~ m/hydra_job_failed\{.*\} 0/);
|
ok($response->is_success, "The page showing the job's prometheus data returns 200.");
|
||||||
ok($metrics =~ m/hydra_job_completion_time\{.*\} [\d]+/);
|
|
||||||
ok($metrics =~ m/hydra_build_closure_size\{.*\} 96/);
|
my $metrics = $response->content;
|
||||||
ok($metrics =~ m/hydra_build_output_size\{.*\} 96/);
|
like($metrics, qr/hydra_job_failed\{.*\} 0/);
|
||||||
|
like($metrics, qr/hydra_job_completion_time\{.*\} [\d]+/);
|
||||||
|
like($metrics, qr/hydra_build_closure_size\{.*\} 96/);
|
||||||
|
like($metrics, qr/hydra_build_output_size\{.*\} 96/);
|
||||||
};
|
};
|
||||||
|
|
||||||
done_testing;
|
done_testing;
|
||||||
|
|||||||
@@ -186,7 +186,7 @@ subtest 'Update jobset "job" to have an invalid input type' => sub {
|
|||||||
})
|
})
|
||||||
);
|
);
|
||||||
ok(!$jobsetupdate->is_success);
|
ok(!$jobsetupdate->is_success);
|
||||||
ok($jobsetupdate->content =~ m/Invalid input type.*valid types:/);
|
like($jobsetupdate->content, qr/Invalid input type.*valid types:/);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@@ -24,7 +24,7 @@ my $cookie = $login->header("set-cookie");
|
|||||||
my $my_jobs = request(GET '/dashboard/alice/my-jobs-tab', Accept => 'application/json', Cookie => $cookie);
|
my $my_jobs = request(GET '/dashboard/alice/my-jobs-tab', Accept => 'application/json', Cookie => $cookie);
|
||||||
ok($my_jobs->is_success);
|
ok($my_jobs->is_success);
|
||||||
my $content = $my_jobs->content();
|
my $content = $my_jobs->content();
|
||||||
ok($content =~ /empty_dir/);
|
like($content, qr/empty_dir/);
|
||||||
ok(!($content =~ /fails/));
|
ok(!($content =~ /fails/));
|
||||||
ok(!($content =~ /succeed_with_failed/));
|
ok(!($content =~ /succeed_with_failed/));
|
||||||
done_testing;
|
done_testing;
|
||||||
|
|||||||
@@ -115,7 +115,7 @@ subtest "evaluation" => sub {
|
|||||||
my $build = decode_json(request_json({ uri => "/build/" . $evals->[0]->{builds}->[0] })->content());
|
my $build = decode_json(request_json({ uri => "/build/" . $evals->[0]->{builds}->[0] })->content());
|
||||||
is($build->{job}, "job", "The build's job name is job");
|
is($build->{job}, "job", "The build's job name is job");
|
||||||
is($build->{finished}, 0, "The build isn't finished yet");
|
is($build->{finished}, 0, "The build isn't finished yet");
|
||||||
ok($build->{buildoutputs}->{out}->{path} =~ /\/nix\/store\/[a-zA-Z0-9]{32}-job$/, "The build's outpath is in the Nix store and named 'job'");
|
like($build->{buildoutputs}->{out}->{path}, qr/\/nix\/store\/[a-zA-Z0-9]{32}-job$/, "The build's outpath is in the Nix store and named 'job'");
|
||||||
|
|
||||||
subtest "search" => sub {
|
subtest "search" => sub {
|
||||||
my $search_project = decode_json(request_json({ uri => "/search/?query=sample" })->content());
|
my $search_project = decode_json(request_json({ uri => "/search/?query=sample" })->content());
|
||||||
|
|||||||
Reference in New Issue
Block a user