Skip to content

Commit 88ae8b7

Browse files
committed
Fix a few places where we weren't handling the OS CLI installed in a location with spaces.
1 parent fe54412 commit 88ae8b7

5 files changed

Lines changed: 12 additions & 12 deletions

File tree

‎ReportSimulationOutput/measure.xml‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,8 @@
33
<schema_version>3.1</schema_version>
44
<name>report_simulation_output</name>
55
<uid>df9d170c-c21a-4130-866d-0d46b06073fd</uid>
6-
<version_id>2753743b-684e-4a8b-a2b6-ad5ae9b26c8b</version_id>
7-
<version_modified>2026-05-13T03:02:08Z</version_modified>
6+
<version_id>9dd500e5-8504-4cec-b9b5-aa5de7947820</version_id>
7+
<version_modified>2026-06-01T22:05:57Z</version_modified>
88
<xml_checksum>9BF1E6AC</xml_checksum>
99
<class_name>ReportSimulationOutput</class_name>
1010
<display_name>HPXML Simulation Output Report</display_name>
@@ -2035,7 +2035,7 @@
20352035
<filename>test_report_sim_output.rb</filename>
20362036
<filetype>rb</filetype>
20372037
<usage_type>test</usage_type>
2038-
<checksum>B8A6AD1B</checksum>
2038+
<checksum>44D1E00E</checksum>
20392039
</file>
20402040
</files>
20412041
</measure>

‎ReportSimulationOutput/tests/test_report_sim_output.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1583,7 +1583,7 @@ def _test_measure(args_hash, expect_success: true)
15831583
assert_equal(args_hash.size, found_args.size)
15841584

15851585
# Run OSW
1586-
success = system("#{OpenStudio.getOpenStudioCLI} run -w \"#{osw_path}\"")
1586+
success = system("\"#{OpenStudio.getOpenStudioCLI}\" run -w \"#{osw_path}\"")
15871587
assert_equal(expect_success, success)
15881588

15891589
# Cleanup

‎ReportUtilityBills/measure.xml‎

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
<?xml version="1.0"?>
22
<measure>
33
<schema_version>3.1</schema_version>
4-
<error>Failed to infer measure name from '/mnt/c/git/openstudio-hpxml/ReportUtilityBills/measure.rb'</error>
4+
<error>Failed to infer measure name from 'C:/git/openstudio-hpxml/ReportUtilityBills/measure.rb'</error>
55
<name>report_utility_bills</name>
66
<uid>ca88a425-e59a-4bc4-af51-c7e7d1e960fe</uid>
7-
<version_id>ddfb35ca-7422-40c3-bd7e-f42ae5a3f47f</version_id>
8-
<version_modified>2026-05-05T22:18:16Z</version_modified>
7+
<version_id>5eb7fb42-055e-431a-8dfc-0b06b646ddc4</version_id>
8+
<version_modified>2026-06-01T22:05:59Z</version_modified>
99
<xml_checksum>15BF4E57</xml_checksum>
1010
<class_name>ReportUtilityBills</class_name>
1111
<display_name>Utility Bills Report</display_name>
@@ -361,7 +361,7 @@
361361
<filename>test_report_utility_bills.rb</filename>
362362
<filetype>rb</filetype>
363363
<usage_type>test</usage_type>
364-
<checksum>7BD8C7FE</checksum>
364+
<checksum>7A7C0E53</checksum>
365365
</file>
366366
</files>
367367
</measure>

‎ReportUtilityBills/tests/test_report_utility_bills.rb‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1180,7 +1180,7 @@ def _test_measure(hpxml: nil, expected_errors: [], expected_warnings: [])
11801180
assert_equal(@args_hash.size, found_args.size)
11811181

11821182
# Run OSW
1183-
command = "#{OpenStudio.getOpenStudioCLI} run -w #{osw_path}"
1183+
command = "\"#{OpenStudio.getOpenStudioCLI}\" run -w #{osw_path}"
11841184
success = system(command)
11851185
assert(success)
11861186

‎tasks.rb‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3762,15 +3762,15 @@ def display_usage(command_list)
37623762
"\"require 'stringio' \"",
37633763
"\"RuboCop::RakeTask.new(:rubocop) do |t| t.options = ['--autocorrect-all', '--format', 'simple'] end\"",
37643764
'"Rake.application[:rubocop].invoke"']
3765-
command = "#{OpenStudio.getOpenStudioCLI} -e #{commands.join(' -e ')}"
3765+
command = "\"#{OpenStudio.getOpenStudioCLI}\" -e #{commands.join(' -e ')}"
37663766
puts 'Applying rubocop auto-correct to measures...'
37673767
system(command)
37683768

37693769
# Update measures XMLs
37703770
puts 'Updating measure.xmls...'
37713771
Dir['**/measure.xml'].each do |measure_xml|
37723772
measure_dir = File.dirname(measure_xml)
3773-
command = "#{OpenStudio.getOpenStudioCLI} measure -u '#{measure_dir}'"
3773+
command = "\"#{OpenStudio.getOpenStudioCLI}\" measure -u '#{measure_dir}'"
37743774
system(command, [:out, :err] => File::NULL)
37753775
end
37763776

@@ -3815,7 +3815,7 @@ def display_usage(command_list)
38153815
# Ensure we run all tests even if there are failures
38163816
failed_tests = []
38173817
tests_rbs.each do |test_rb|
3818-
success = system("#{OpenStudio.getOpenStudioCLI} #{test_rb}")
3818+
success = system("\"#{OpenStudio.getOpenStudioCLI}\" #{test_rb}")
38193819
failed_tests << test_rb unless success
38203820
end
38213821

0 commit comments

Comments
 (0)