From 5596ebb95df0683987d9b42b55d1c4ff366b55fe Mon Sep 17 00:00:00 2001 From: Zachary Goldberg Date: Thu, 15 Jun 2023 10:09:14 -0700 Subject: [PATCH] chore: fix unallowed characters in single test split script (#12807) * chore: fix_unallowed_characters_in_single_split_script * chore: fix_unallowed_characters_in_single_split_script --- scripts/generate_single_test_buildspec_codebuild.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/scripts/generate_single_test_buildspec_codebuild.ts b/scripts/generate_single_test_buildspec_codebuild.ts index 86283296b91..6a57ced4837 100644 --- a/scripts/generate_single_test_buildspec_codebuild.ts +++ b/scripts/generate_single_test_buildspec_codebuild.ts @@ -52,7 +52,13 @@ const main = () => { ]; const jobBuildSpec: jobBuildSpecType = { - identifier: `${os}_${filePath.replace('src/__tests__/', '').replace('.test', '').replace('.ts', '')}`, + identifier: `${os}_${filePath + .replace(/src\/__tests__\//g, '') + .replace(/\.test/g, '') + .replace(/\.ts/g, '') + .replace(/\./g, '_') + .replace(/-/g, '_') + .replace(/\//g, '_')}`, buildspec: os === 'l' ? 'codebuild_specs/run_e2e_tests_linux.yml' : 'codebuild_specs/run_e2e_tests_windows.yml', env: { variables: {