aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsinanmohd <sinan@sinanmohd.com>2024-08-17 18:48:33 +0530
committersinanmohd <sinan@sinanmohd.com>2024-08-17 18:50:33 +0530
commite4550b63118765c0affd653234749a92fc51961f (patch)
treebbf3990cfcaa78dd97eb8d66d539b4e9caa0f308
parent37d813bf6be0570c6feab070002451bd6042b0d7 (diff)
evanix: --max-build -> --max-builds
-rw-r--r--include/evanix.h2
-rw-r--r--nixos/tests/dsl.nix2
-rw-r--r--src/evanix.c8
-rw-r--r--src/meson.build2
-rw-r--r--src/queue.c4
-rw-r--r--tests/dag.c2
6 files changed, 10 insertions, 10 deletions
diff --git a/include/evanix.h b/include/evanix.h
index 34d4918..5d512ae 100644
--- a/include/evanix.h
+++ b/include/evanix.h
@@ -14,7 +14,7 @@ struct evanix_opts_t {
bool check_cache_status;
bool break_evanix;
char *system;
- uint32_t max_build;
+ uint32_t max_builds;
int (*solver)(struct job **, struct job_clist *, int32_t);
};
diff --git a/nixos/tests/dsl.nix b/nixos/tests/dsl.nix
index d2a4420..18d7ed4 100644
--- a/nixos/tests/dsl.nix
+++ b/nixos/tests/dsl.nix
@@ -237,7 +237,7 @@ in
evanix_args = ["evanix", "${targets}", "--dry-run", "--close-unused-fd", "false"]
if (allow_builds := config["constraints"]["builds"]) is not None:
- evanix_args.extend(["--solver=highs", "--max-build", str(allow_builds)])
+ evanix_args.extend(["--solver=highs", "--max-builds", str(allow_builds)])
expect_chosen_nodes = set(name for name, node in nodes.items() if node["test"]["chosen"])
expect_n_chosen_builds = config["test"]["constrained"]["builds"]
diff --git a/src/evanix.c b/src/evanix.c
index d46a366..2cf8469 100644
--- a/src/evanix.c
+++ b/src/evanix.c
@@ -19,7 +19,7 @@ static const char usage[] =
" -d, --dry-run Show what derivations would be "
"built.\n"
" -s, --system System to build for.\n"
- " -m, --max-build Max number of builds.\n"
+ " -m, --max-builds Max number of builds.\n"
" -b, --break-evanix Enable experimental features.\n"
" -r, --solver-report Print solver report.\n"
" -p, --pipelined <bool> Use evanix build pipeline.\n"
@@ -33,7 +33,7 @@ struct evanix_opts_t evanix_opts = {
.isflake = false,
.ispipelined = true,
.isdryrun = false,
- .max_build = 0,
+ .max_builds = 0,
.system = NULL,
.solver_report = false,
.check_cache_status = true,
@@ -139,8 +139,8 @@ int opts_read(struct evanix_opts_t *opts, char **expr, int argc, char *argv[])
{"solver", required_argument, NULL, 'k'},
{"system", required_argument, NULL, 's'},
{"solver-report", no_argument, NULL, 'r'},
- {"max-build", required_argument, NULL, 'm'},
{"pipelined", required_argument, NULL, 'p'},
+ {"max-builds", required_argument, NULL, 'm'},
{"close-unused-fd", required_argument, NULL, 'c'},
{"check-cache-status", required_argument, NULL, 'l'},
{NULL, 0, NULL, 0},
@@ -197,7 +197,7 @@ int opts_read(struct evanix_opts_t *opts, char **expr, int argc, char *argv[])
return -EINVAL;
}
- opts->max_build = ret;
+ opts->max_builds = ret;
break;
case 'p':
ret = atob(optarg);
diff --git a/src/meson.build b/src/meson.build
index 4217858..4894e1c 100644
--- a/src/meson.build
+++ b/src/meson.build
@@ -24,7 +24,7 @@ foreach solver : ['sjf', 'highs', 'conformity']
test(f'evanix-@solver@', e, args: [
'--dry-run',
'--close-unused-fd=false',
- '--max-build=3',
+ '--max-builds=3',
'--solver-report',
f'--solver=@solver@',
'--flake',
diff --git a/src/queue.c b/src/queue.c
index b914d0f..dbccd66 100644
--- a/src/queue.c
+++ b/src/queue.c
@@ -102,7 +102,7 @@ int queue_pop(struct queue *queue, struct job **job)
}
pthread_mutex_lock(&queue->mutex);
- if (evanix_opts.max_build) {
+ if (evanix_opts.max_builds) {
ret = evanix_opts.solver(&j, &queue->jobs, queue->resources);
if (ret < 0)
goto out_mutex_unlock;
@@ -242,7 +242,7 @@ int queue_thread_new(struct queue_thread **queue_thread, FILE *stream)
goto out_free_qt;
}
qt->queue->htab = NULL;
- qt->queue->resources = evanix_opts.max_build;
+ qt->queue->resources = evanix_opts.max_builds;
qt->queue->jobid = NULL;
qt->queue->state = Q_SEM_WAIT;
ret = sem_init(&qt->queue->sem, 0, 0);
diff --git a/tests/dag.c b/tests/dag.c
index c49bf34..f7a1937 100644
--- a/tests/dag.c
+++ b/tests/dag.c
@@ -19,7 +19,7 @@ struct evanix_opts_t evanix_opts = {
.isflake = false,
.ispipelined = true,
.isdryrun = false,
- .max_build = 0,
+ .max_builds = 0,
.system = NULL,
.solver_report = false,
.check_cache_status = false,