Skip to content

Commit 1dfc6db

Browse files
committed
add a cloud related mode
1 parent ee3dff9 commit 1dfc6db

File tree

3 files changed

+39
-22
lines changed

3 files changed

+39
-22
lines changed

build/build/src/ci_gen/job.rs

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -245,31 +245,31 @@ impl JobArchetype for StandardLibraryTests {
245245
fn job(&self, target: Target) -> Job {
246246
let graal_edition = self.graal_edition;
247247
let should_enable_cloud_tests = self.cloud_tests_enabled;
248+
// If cloud tests are enabled, we run only cloud related tests.
249+
let test_scope =
250+
if should_enable_cloud_tests { "std-cloud-related" } else { "standard-library" };
248251
let job_name = format!("Standard Library Tests ({graal_edition})");
249-
let run_steps_builder =
250-
RunStepsBuilder::new("backend test standard-library").customize(move |step| {
251-
let main_step = step
252-
.with_secret_exposed_as(
253-
secret::ENSO_LIB_S3_AWS_REGION,
254-
crate::libraries_tests::s3::env::ENSO_LIB_S3_AWS_REGION,
255-
)
256-
.with_secret_exposed_as(
257-
secret::ENSO_LIB_S3_AWS_ACCESS_KEY_ID,
258-
crate::libraries_tests::s3::env::ENSO_LIB_S3_AWS_ACCESS_KEY_ID,
259-
)
260-
.with_secret_exposed_as(
261-
secret::ENSO_LIB_S3_AWS_SECRET_ACCESS_KEY,
262-
crate::libraries_tests::s3::env::ENSO_LIB_S3_AWS_SECRET_ACCESS_KEY,
263-
);
252+
let run_command = format!("backend test {test_scope}");
253+
let run_steps_builder = RunStepsBuilder::new(run_command).customize(move |step| {
254+
let main_step = step
255+
.with_secret_exposed_as(
256+
secret::ENSO_LIB_S3_AWS_REGION,
257+
crate::libraries_tests::s3::env::ENSO_LIB_S3_AWS_REGION,
258+
)
259+
.with_secret_exposed_as(
260+
secret::ENSO_LIB_S3_AWS_ACCESS_KEY_ID,
261+
crate::libraries_tests::s3::env::ENSO_LIB_S3_AWS_ACCESS_KEY_ID,
262+
)
263+
.with_secret_exposed_as(
264+
secret::ENSO_LIB_S3_AWS_SECRET_ACCESS_KEY,
265+
crate::libraries_tests::s3::env::ENSO_LIB_S3_AWS_SECRET_ACCESS_KEY,
266+
);
264267

265-
let updated_main_step = if should_enable_cloud_tests {
266-
enable_cloud_tests(main_step)
267-
} else {
268-
main_step
269-
};
268+
let updated_main_step =
269+
if should_enable_cloud_tests { enable_cloud_tests(main_step) } else { main_step };
270270

271-
vec![updated_main_step, step::stdlib_test_reporter(target, graal_edition)]
272-
});
271+
vec![updated_main_step, step::stdlib_test_reporter(target, graal_edition)]
272+
});
273273
let mut job = build_job_ensuring_cloud_tests_run_on_github(
274274
run_steps_builder,
275275
target,

build/build/src/engine.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,10 +149,18 @@ pub enum Benchmarks {
149149

150150
#[derive(Clone, Copy, Debug, Display, PartialEq, Eq, PartialOrd, Ord, clap::ValueEnum)]
151151
pub enum Tests {
152+
/// Run the JVM tests.
152153
Jvm,
154+
155+
/// Run all Standard Library tests.
153156
#[clap(alias = "stdlib")]
154157
StandardLibrary,
158+
159+
/// Run the Snowflake tests.
155160
StdSnowflake,
161+
162+
/// Run a subset of Standard Library tests that deals with Cloud-related functionality.
163+
StdCloudRelated,
156164
}
157165

158166
impl Benchmarks {

build/cli/src/lib.rs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -407,6 +407,15 @@ impl Processor {
407407
"Snowflake_Tests".to_string()
408408
]),
409409
),
410+
Tests::StdCloudRelated => config.add_standard_library_test_selection(
411+
StandardLibraryTestsSelection::Selected(vec![
412+
"Base_Tests".to_string(),
413+
// Table tests check integration of e.g. Postgres datalinks
414+
"Table_Tests".to_string(),
415+
// AWS tests check copying between Cloud and S3
416+
"AWS_Tests".to_string(),
417+
]),
418+
),
410419
}
411420
}
412421
let context = self.prepare_backend_context(config);

0 commit comments

Comments
 (0)