NREL / OpenStudio

OpenStudio is a cross-platform collection of software tools to support whole building energy modeling using EnergyPlus and advanced daylight analysis using Radiance.
https://www.openstudio.net/
Other
486 stars 186 forks source link

Fix #5076 - /tmp/xmlvalidation directories not cleaned up for factory methods bclXMLValidator & gbxmlValidator #5079

Closed jmarrec closed 6 months ago

jmarrec commented 6 months ago

Pull request overview

Pull Request Author

Labels:

Review Checklist

This will not be exhaustively relevant to every PR.

jmarrec commented 6 months ago

Ok tests fail before fix, work with fix

Before:

[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from XMLValidatorFixture
[ RUN      ] XMLValidatorFixture.XMLValidator_bclXMLValidator_Cleanup
/Users/julien/Software/Others/OpenStudio2/src/utilities/xml/Test/XMLValidator_GTest.cpp:171: Failure
Value of: openstudio::filesystem::exists(tmpDir)
  Actual: true
Expected: false
Expected tmpDir to be deleted: "/var/folders/bz/sgrc10ls2d9fz7418xw3wgym0000gn/T/xmlvalidation-fac0-5db6-68ba-39e5-1705421114-0"
[  FAILED  ] XMLValidatorFixture.XMLValidator_bclXMLValidator_Cleanup (0 ms)
[----------] 1 test from XMLValidatorFixture (0 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] XMLValidatorFixture.XMLValidator_bclXMLValidator_Cleanup

 1 FAILED TEST

    Start 185: XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup
2/2 Test #185: XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup ....***Failed    0.01 sec
Running main() from /Users/julien/.conan/data/gtest/1.11.0/_/_/build/dbd8bc9563b5a1f4052cc1968e26d22031450443/source_subfolder/googletest/src/gtest_main.cc
Note: Google Test filter = XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup
[==========] Running 1 test from 1 test suite.
[----------] Global test environment set-up.
[----------] 1 test from XMLValidatorFixture
[ RUN      ] XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup
/Users/julien/Software/Others/OpenStudio2/src/utilities/xml/Test/XMLValidator_GTest.cpp:183: Failure
Value of: openstudio::filesystem::exists(tmpDir)
  Actual: true
Expected: false
Expected tmpDir to be deleted: "/var/folders/bz/sgrc10ls2d9fz7418xw3wgym0000gn/T/xmlvalidation-6495-53c1-ddfb-bb6b-1705421114-0"
[  FAILED  ] XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup (1 ms)
[----------] 1 test from XMLValidatorFixture (1 ms total)

[----------] Global test environment tear-down
[==========] 1 test from 1 test suite ran. (1 ms total)
[  PASSED  ] 0 tests.
[  FAILED  ] 1 test, listed below:
[  FAILED  ] XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup

 1 FAILED TEST

0% tests passed, 2 tests failed out of 2

Total Test time (real) =   0.14 sec

The following tests FAILED:
        184 - XMLValidatorFixture.XMLValidator_bclXMLValidator_Cleanup (Failed)
        185 - XMLValidatorFixture.XMLValidator_gbxmlValidator_Cleanup (Failed)
ci-commercialbuildings commented 6 months ago

CI Results for c103518ec47f56795c4eb89d17ac3a3d3d34ea0f: