From 8f17199d16bcdb29516d34514f95d1a117f6bd26 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Fri, 13 Sep 2024 09:58:17 -0400 Subject: Implement multiprocessing pool(s) * Adds --cpu-limit and --parallel-fail-fast arguments * Adds disable, parallel, and setup_script keys to [test] blocks --- src/globals.c | 28 ++++++++++++++-------------- 1 file changed, 14 insertions(+), 14 deletions(-) (limited to 'src/globals.c') diff --git a/src/globals.c b/src/globals.c index 1e27959..667809b 100644 --- a/src/globals.c +++ b/src/globals.c @@ -25,19 +25,20 @@ const char *BANNER = "Association of Universities for Research in Astronomy (AURA)\n"; struct STASIS_GLOBAL globals = { - .verbose = false, - .continue_on_error = false, - .always_update_base_environment = false, - .conda_fresh_start = true, - .conda_install_prefix = NULL, - .conda_packages = NULL, - .pip_packages = NULL, - .tmpdir = NULL, - .enable_docker = true, - .enable_artifactory = true, - .enable_artifactory_build_info = true, - .enable_testing = true, - .enable_rewrite_spec_stage_2 = true, + .verbose = false, ///< Toggle verbose mode + .continue_on_error = false, ///< Do not stop program on error + .always_update_base_environment = false, ///< Run "conda update --all" after installing Conda + .conda_fresh_start = true, ///< Remove/reinstall Conda at startup + .conda_install_prefix = NULL, ///< Path to install Conda + .conda_packages = NULL, ///< Conda packages to install + .pip_packages = NULL, ///< Python packages to install + .tmpdir = NULL, ///< Path to store temporary data + .enable_docker = true, ///< Toggle docker usage + .enable_artifactory = true, ///< Toggle artifactory server usage + .enable_artifactory_build_info = true, ///< Toggle build-info uploads + .enable_testing = true, ///< Toggle [test] block "script" execution. "script_setup" always executes. + .enable_rewrite_spec_stage_2 = true, ///< Leave template stings in output files + .parallel_fail_fast = false, ///< Kill ALL multiprocessing tasks immediately on error }; void globals_free() { @@ -55,7 +56,6 @@ void globals_free() { guard_free(globals.jfrog.jfrog_artifactory_base_url); guard_free(globals.jfrog.jfrog_artifactory_product); guard_free(globals.jfrog.remote_filename); - guard_free(globals.workaround.tox_posargs); guard_free(globals.workaround.conda_reactivate); if (globals.envctl) { envctl_free(&globals.envctl); -- cgit From f6c504630ecfa38c1516123019bdf67b921f1107 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 2 Oct 2024 14:56:59 -0400 Subject: Allow user to define the time interval for "task is running" message --- src/globals.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/globals.c') diff --git a/src/globals.c b/src/globals.c index 667809b..b93566a 100644 --- a/src/globals.c +++ b/src/globals.c @@ -39,6 +39,7 @@ struct STASIS_GLOBAL globals = { .enable_testing = true, ///< Toggle [test] block "script" execution. "script_setup" always executes. .enable_rewrite_spec_stage_2 = true, ///< Leave template stings in output files .parallel_fail_fast = false, ///< Kill ALL multiprocessing tasks immediately on error + .pool_status_interval = 30, ///< Report "Task is running" }; void globals_free() { -- cgit From 6fe8c2572fbf73cee3936ab241fcbfbdd54fe633 Mon Sep 17 00:00:00 2001 From: Joseph Hunkeler Date: Wed, 2 Oct 2024 15:00:12 -0400 Subject: Allow user to disable parallel mode (shortcut for --cpu-limit=1) --- src/globals.c | 1 + 1 file changed, 1 insertion(+) (limited to 'src/globals.c') diff --git a/src/globals.c b/src/globals.c index b93566a..1b682cb 100644 --- a/src/globals.c +++ b/src/globals.c @@ -38,6 +38,7 @@ struct STASIS_GLOBAL globals = { .enable_artifactory_build_info = true, ///< Toggle build-info uploads .enable_testing = true, ///< Toggle [test] block "script" execution. "script_setup" always executes. .enable_rewrite_spec_stage_2 = true, ///< Leave template stings in output files + .enable_parallel = true, ///< Toggle testing in parallel .parallel_fail_fast = false, ///< Kill ALL multiprocessing tasks immediately on error .pool_status_interval = 30, ///< Report "Task is running" }; -- cgit