-
Notifications
You must be signed in to change notification settings - Fork 193
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
Fix tests #5184
Conversation
# gem 'openstudio-extension', git: 'https://github.com/NREL/openstudio-extension-gem.git', ref: 'v0.8.0' | ||
gem 'simplecov', git: 'https://github.com/simplecov-ruby/simplecov', ref: 'v0.21.2' |
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.
Disable using openstudio-extension, cf comment below
# TODO: until we have gems on rubygems, this is unpractical without forcing a | ||
# download from git for all openstudio-extension, measure-tester, and workflow | ||
# gems | ||
|
||
# # test a github checkout gem | ||
# require 'openstudio' | ||
# require 'openstudio/extension' | ||
# puts OpenStudio::Extension::VERSION | ||
# raise "OpenStudio Extension version does not match" unless OpenStudio::Extension::VERSION.to_s == '0.8.0' | ||
|
||
# did_fail = false | ||
# begin | ||
# require 'openstudio-standards' | ||
# rescue LoadError | ||
# did_fail = true | ||
# end | ||
# raise "Should allow to load the embedded openstudio-standards" unless did_fail == false |
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.
Note the comment here.
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.
@DavidGoldwasser was working on gettig all of the gems published yesterday. The plan is to have this done prior to an RC2. (maybe today?)
@@ -68,7 +68,7 @@ def run_file( | |||
) | |||
|
|||
r = subprocess.run( | |||
[str(args.ruby_or_cli_path), "-e", "at exit { exit 12 }"], | |||
[str(args.ruby_or_cli_path), "-e", "at_exit { exit 12 }"], |
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.
typo
no_block_glob = Dir["*.txt", "*.cpp"] | ||
assert_instance_of(Array, no_block_glob) | ||
assert_includes(no_block_glob, 'CMakeLists.txt') | ||
assert_includes(no_block_glob, 'embedded_help.rb') | ||
puts no_block_glob.index('test_embedded_help.rb') | ||
assert_nil(no_block_glob.index('test_embedded_help.rb')) | ||
assert_includes(no_block_glob, 'main.cpp') | ||
assert_nil(no_block_glob.index('test_main.cpp')) |
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.
embedded_help.rb is no longer in the src/cli directory, but in the ruby/engine dir, so adjust the test. It must have been failing, silently, for a year and a half since 50f6c03
def test_sdbm | ||
require 'sdbm' | ||
|
||
SDBM.open 'my_database' do |db| | ||
db['apple'] = 'fruit' | ||
db['pear'] = 'fruit' | ||
db['carrot'] = 'vegetable' | ||
db['tomato'] = 'vegetable' | ||
end | ||
assert(true) | ||
end |
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.
This gem has been gone for...? ever I would say.
@@ -234,6 +222,7 @@ def test_msgpack | |||
end | |||
|
|||
def test_json_schemer | |||
skip("Disabled due to unf_ext, see https://github.com/NREL/openstudio-gems/issues/72") |
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.
Disable with a comment
if logLevel in ['Trace', 'Debug']: | ||
assert f"[openstudio.CLI] <-2> Setting Log Level to {logLevel} ({loglevel_int_value})" in lines |
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.
Adjust test with recent changes
@@ -163,7 +163,7 @@ void OSWorkflow::runEnergyPlus() { | |||
LOG(Info, "Running command '" << cmd << "'"); | |||
|
|||
int result = 0; | |||
detailedTimeBlock("Running ExpandObjects", [this, /*&cmd,*/ &result, &runDirPath, &runDirResults, &stdout_ofs] { | |||
detailedTimeBlock("Running ExpandObjects", [this, /*&cmd,*/ &result, &runDirResults, &stdout_ofs] { |
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.
clang 15 complains when unused lambda capture.
CI Results for 05ca3f6:
|
The tests are passing on my mac. I think the issue is that the runner doesn't have ruby 3.2.2 activated with bundler installed when it tries to run the tests that match
|
Yeah, I am pushing the new cmake docker image comes with ruby3. |
Running (https://ci.openstudio.net/blue/organizations/jenkins/openstudio-incremental-ubuntu-20-04/detail/PR-5184/6/pipeline/49/) , need to update the CONAN_HOME in my docker image to /root/ to align with other docker images tomorrow. |
Updated the image in the master after we merge the PR. Now all them should be align with the local environments. |
Pull request overview
Fixup failing tests on develop after the merge festival
Pull Request Author
src/model/test
)src/energyplus/Test
)src/osversion/VersionTranslator.cpp
)Labels:
IDDChange
APIChange
Pull Request - Ready for CI
so that CI builds your PRReview Checklist
This will not be exhaustively relevant to every PR.