-
-
Notifications
You must be signed in to change notification settings - Fork 14
🤖 Fix CI E2E harness bugs and shell compatibility issues #555
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -135,7 +135,7 @@ def generate_datetime_data_from_cldr(self, dt_json_path, run_limit=-1): | |||||||||
| self.saveJsonFile(dt_test_path, test_obj, indent=2) | ||||||||||
| self.saveJsonFile(dt_verify_path, verify_obj, indent=2) | ||||||||||
| except BaseException as err: | ||||||||||
| logging.error('!!! %s: Failure to save file %s', err, ) | ||||||||||
| logging.error('!!! %s: Failure to save files: %s and %s', err, dt_test_path, dt_verify_path) | ||||||||||
| return None | ||||||||||
|
|
||||||||||
| def process_test_data(self): | ||||||||||
|
|
@@ -164,7 +164,7 @@ def process_test_data(self): | |||||||||
| # Set up Node version and call the generator | ||||||||||
| # Add temporal to the package. | ||||||||||
| nvm_version = icu_nvm_versions[self.icu_version] | ||||||||||
| generate_command = 'source ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; npm ci; node generators/datetime_gen.js %s %s' % ( | ||||||||||
| generate_command = '. ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; npm ci; node generators/datetime_gen.js %s %s' % ( | ||||||||||
| nvm_version, nvm_version, '-run_limit', self.run_limit) | ||||||||||
|
Comment on lines
+167
to
168
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of hardcoding
Suggested change
|
||||||||||
|
|
||||||||||
| result = subprocess.run(generate_command, shell=True) | ||||||||||
|
Comment on lines
166
to
170
|
||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -34,11 +34,11 @@ def process_test_data(self): | |||||||||
|
|
||||||||||
| # Set up Node version and call the generator | ||||||||||
| nvm_version = icu_nvm_versions[self.icu_version] | ||||||||||
| generate_command = 'source ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; %s' %\ | ||||||||||
| generate_command = '. ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; %s' %\ | ||||||||||
| (nvm_version, nvm_version, ' '.join(exec_list)) | ||||||||||
|
Comment on lines
+37
to
38
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of hardcoding
Suggested change
|
||||||||||
|
|
||||||||||
| logging.debug('Running this command: %s', generate_command) | ||||||||||
| result = result = subprocess.run(generate_command, shell=True) | ||||||||||
| result = subprocess.run(generate_command, shell=True) | ||||||||||
|
Comment on lines
+37
to
+41
|
||||||||||
|
|
||||||||||
| # Move results to the right directory | ||||||||||
| mv_command = 'mv list_fmt*.json %s' % self.icu_version | ||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -35,10 +35,6 @@ def process_test_data(self): | |||||||||
| exec_list.append(str(self.run_limit)) | ||||||||||
| exec_command = ' '.join(exec_list) | ||||||||||
|
|
||||||||||
| nodejs_version = icu_nvm_versions[self.icu_version] | ||||||||||
| source_command = 'source ~/.nvm/nvm.sh; nvm run %s; %s' % ( | ||||||||||
| nodejs_version, exec_command) | ||||||||||
|
|
||||||||||
| if self.icu_version not in icu_nvm_versions: | ||||||||||
| logging.warning('Generating relative date/time data not configured for icu version %s', self.icu_version) | ||||||||||
| return False | ||||||||||
|
|
@@ -47,7 +43,7 @@ def process_test_data(self): | |||||||||
|
|
||||||||||
| # Set up Node version and call the generator | ||||||||||
| nvm_version = icu_nvm_versions[self.icu_version] | ||||||||||
| generate_command = 'source ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; %s' %\ | ||||||||||
| generate_command = '. ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; %s' %\ | ||||||||||
| (nvm_version, nvm_version, ' '.join(exec_list)) | ||||||||||
|
Comment on lines
+46
to
47
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of hardcoding
Suggested change
|
||||||||||
|
|
||||||||||
| result = subprocess.run(generate_command, shell=True) | ||||||||||
|
Comment on lines
45
to
49
|
||||||||||
|
|
||||||||||
| Original file line number | Diff line number | Diff line change | ||||||||
|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -35,7 +35,7 @@ def process_test_data(self): | |||||||||
|
|
||||||||||
| # Set up Node version and call the generator | ||||||||||
| nvm_version = icu_nvm_versions[self.icu_version] | ||||||||||
| generate_command = 'source ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; %s' %\ | ||||||||||
| generate_command = '. ~/.nvm/nvm.sh; nvm install %s; nvm use %s --silent; %s' %\ | ||||||||||
| (nvm_version, nvm_version, ' '.join(exec_list)) | ||||||||||
|
Comment on lines
+38
to
39
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Instead of hardcoding
Suggested change
|
||||||||||
|
|
||||||||||
| logging.debug('Running this command: %s', generate_command) | ||||||||||
|
|
||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using
logging.exceptionis preferred overlogging.errorwhen logging from within anexceptblock. It automatically captures and logs the traceback, which is extremely helpful for debugging failures in CI.