Skip to content
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

Enable Tests in EGOA #18

Merged

Conversation

franziska-wegner
Copy link
Owner

@franziska-wegner franziska-wegner commented Dec 7, 2023

Enable TestBound in the CMakeFile of the test folder. In this version, we duplicate the CMake and CMake builds to download the Google Test Framework. This is required due to the fact that with the current option ExternalProject_Add the external project is only downloaded and installed during the first CMake build. We will change this in another PR to align it with the framework Eigen.

Changes to be committed:
modified: tests/CMakeLists.txt

Screenshot 2023-12-07 at 6 09 39 AM

Tests that work on linux "obviously" do not work always with windows ¯_(ツ)_/¯, e.g., in debug mode.

Screenshot 2023-12-08 at 6 16 10 AM

The above test fail was due to the fact that (.*) regular expression is not supported, but .* is. The issue is only happening on Windows. In addition, the message looks a little bit different on Windows compared to Unix systems. The output differs in "inside Bound.\n Condition" (Unix) from "inside egoa::Bound::Bound.\n Condition" (Windows).

@franziska-wegner franziska-wegner self-assigned this Dec 7, 2023
@franziska-wegner franziska-wegner added the tests Add or update tests to EGOA label Dec 7, 2023
Changes to be committed:
	modified:   tests/CMakeLists.txt
Changes to be committed:
	new file:   tests/DataStructures/TestBound.cpp
	new file:   tests/DataStructures/TestBound.hpp
Changes to be committed:
	modified:   tests/CMakeLists.txt
@franziska-wegner franziska-wegner force-pushed the franziska-wegner/2023/december/tests/enable-TestBound branch from 8ce8e12 to 76a6592 Compare December 7, 2023 12:53
Changes to be committed:
	modified:   CMakeLists.txt
Changes to be committed:
	modified:   CMakeLists.txt
Why:
* add subdirectory in CMake requires the CMakeFile that is not downloaded yet

Changes to be committed:
	modified:   .github/workflows/cmake-multi-platform.yml
Changes to be committed:
	modified:   CMakeLists.txt
@franziska-wegner franziska-wegner marked this pull request as ready for review December 7, 2023 20:41
@franziska-wegner franziska-wegner marked this pull request as draft December 7, 2023 21:05
franziska-wegner and others added 9 commits December 7, 2023 13:29
Changes to be committed:
	modified:   CMakeLists.txt
Changes to be committed:
	modified:   CMakeLists.txt
…tected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in TestBound.obj [D:\a\egoa\egoa\build\tests\TestBound.vcxproj]

See note in:
https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html#variable:CMAKE_MSVC_RUNTIME_LIBRARY

Changes to be committed:
	modified:   CMakeLists.txt
Changes to be committed:
	modified:   tests/DataStructures/TestBound.cpp
Changes to be committed:
	modified:   CMakeLists.txt
D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src/gtest-port.cc(844): error: Failed
1: Syntax error at index 42 in simple regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.
1:  Condition: minimum_ <= maximum_": ')' is unsupported.
1:
1: Running main() from D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src\gtest_main.cc
1: D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
1:     Result: died but not with expected error.
1:   Expected: contains regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.\n Condition: minimum_ <= maximum_"
1: Actual msg:
1: [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
1: [  DEATH   ]  Condition: minimum_ <= maximum_
1:
1: [  FAILED  ] TestBound.DeathTest (146 ms)

Changes to be committed:
	modified:   tests/Helper/TestHelper.hpp
…Bound<double>::Bound.\n Condition".

 D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
1:     Result: died but not with expected error.
1:   Expected: contains regular expression ".* assertion failed at .*Bound.hpp:.* inside Bound.\n Condition: minimum_ <= maximum_"
1: Actual msg:
1: [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
1: [  DEATH   ]  Condition: minimum_ <= maximum_

Changes to be committed:
	modified:   tests/Helper/TestHelper.hpp
@franziska-wegner franziska-wegner marked this pull request as ready for review December 8, 2023 15:41
@franziska-wegner franziska-wegner changed the title Enable TestBound in the Test Enable Tests in EGOA Dec 8, 2023
@franziska-wegner franziska-wegner merged commit 63a79b1 into main Dec 8, 2023
12 checks passed
@franziska-wegner franziska-wegner deleted the franziska-wegner/2023/december/tests/enable-TestBound branch December 8, 2023 15:46
github-actions bot added a commit that referenced this pull request Dec 8, 2023
Enable TestBound in the CMakeFile of the test folder. In this version, we duplicate the CMake and CMake builds to download the Google Test Framework. This is required due to the fact that with the current option ExternalProject_Add the external project is only downloaded and installed during the first CMake build. We will change this in another PR to align it with the framework Eigen.

Tests that work on linux "obviously" do not work always with windows ¯_(ツ)_/¯, e.g., in debug mode.

The above test fail was due to the fact that (.*) regular expression is not supported, but .* is. The issue is only happening on Windows. In addition, the message looks a little bit different on Windows compared to Unix systems. The output differs in "inside Bound.\n Condition" (Unix) from "inside egoa::Bound::Bound.\n Condition" (Windows).

Commits:
* Enable TestBound in the CMakeFile
* Add TestBound testcases
* Remove Gurobi Library from TestBound
* Check whether Windows and MacOS find the include with that file
* Replace find_package with own find CMake for Google Testframework
* Downloads need an initial build then the data is on the disk
   Why:
           * add subdirectory in CMake requires the CMakeFile that is not downloaded yet
* Check sudo
* The error in the tests is due to wrong runtime library
* Does DLL works
* Check without debug
* Resolve libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in TestBound.obj [D:\a\egoa\egoa\build\tests\TestBound.vcxproj]
      See note in: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html#variable:CMAKE_MSVC_RUNTIME_LIBRARY
* Fix a label mistake
* Add more verbose to the test output to understand what is going on
* Check if differentiation is necessary between Debug and Release
* Follow the error given in Windows debug death test "')' is unsupported"
        D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src/gtest-port.cc(844): error: Failed
        Syntax error at index 42 in simple regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.
        Condition: minimum_ <= maximum_": ')' is unsupported.

        Running main() from D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src\gtest_main.cc
        D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
        Expected: contains regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_

        [  FAILED  ] TestBound.DeathTest (146 ms)
* The output differs in "inside Bound.\n Condition" from "inside egoa::Bound<double>::Bound.\n Condition".
 D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
                Expected: contains regular expression ".* assertion failed at .*Bound.hpp:.* inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_ 63a79b1
github-actions bot added a commit that referenced this pull request Dec 8, 2023
Enable TestBound in the CMakeFile of the test folder. In this version, we duplicate the CMake and CMake builds to download the Google Test Framework. This is required due to the fact that with the current option ExternalProject_Add the external project is only downloaded and installed during the first CMake build. We will change this in another PR to align it with the framework Eigen.

Tests that work on linux "obviously" do not work always with windows ¯_(ツ)_/¯, e.g., in debug mode.

The above test fail was due to the fact that (.*) regular expression is not supported, but .* is. The issue is only happening on Windows. In addition, the message looks a little bit different on Windows compared to Unix systems. The output differs in "inside Bound.\n Condition" (Unix) from "inside egoa::Bound::Bound.\n Condition" (Windows).

Commits:
* Enable TestBound in the CMakeFile
* Add TestBound testcases
* Remove Gurobi Library from TestBound
* Check whether Windows and MacOS find the include with that file
* Replace find_package with own find CMake for Google Testframework
* Downloads need an initial build then the data is on the disk
   Why:
           * add subdirectory in CMake requires the CMakeFile that is not downloaded yet
* Check sudo
* The error in the tests is due to wrong runtime library
* Does DLL works
* Check without debug
* Resolve libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in TestBound.obj [D:\a\egoa\egoa\build\tests\TestBound.vcxproj]
      See note in: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html#variable:CMAKE_MSVC_RUNTIME_LIBRARY
* Fix a label mistake
* Add more verbose to the test output to understand what is going on
* Check if differentiation is necessary between Debug and Release
* Follow the error given in Windows debug death test "')' is unsupported"
        D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src/gtest-port.cc(844): error: Failed
        Syntax error at index 42 in simple regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.
        Condition: minimum_ <= maximum_": ')' is unsupported.

        Running main() from D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src\gtest_main.cc
        D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
        Expected: contains regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_

        [  FAILED  ] TestBound.DeathTest (146 ms)
* The output differs in "inside Bound.\n Condition" from "inside egoa::Bound<double>::Bound.\n Condition".
 D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
                Expected: contains regular expression ".* assertion failed at .*Bound.hpp:.* inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_ 63a79b1
github-actions bot added a commit that referenced this pull request Dec 8, 2023
Enable TestBound in the CMakeFile of the test folder. In this version, we duplicate the CMake and CMake builds to download the Google Test Framework. This is required due to the fact that with the current option ExternalProject_Add the external project is only downloaded and installed during the first CMake build. We will change this in another PR to align it with the framework Eigen.

Tests that work on linux "obviously" do not work always with windows ¯_(ツ)_/¯, e.g., in debug mode.

The above test fail was due to the fact that (.*) regular expression is not supported, but .* is. The issue is only happening on Windows. In addition, the message looks a little bit different on Windows compared to Unix systems. The output differs in "inside Bound.\n Condition" (Unix) from "inside egoa::Bound::Bound.\n Condition" (Windows).

Commits:
* Enable TestBound in the CMakeFile
* Add TestBound testcases
* Remove Gurobi Library from TestBound
* Check whether Windows and MacOS find the include with that file
* Replace find_package with own find CMake for Google Testframework
* Downloads need an initial build then the data is on the disk
   Why:
           * add subdirectory in CMake requires the CMakeFile that is not downloaded yet
* Check sudo
* The error in the tests is due to wrong runtime library
* Does DLL works
* Check without debug
* Resolve libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in TestBound.obj [D:\a\egoa\egoa\build\tests\TestBound.vcxproj]
      See note in: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html#variable:CMAKE_MSVC_RUNTIME_LIBRARY
* Fix a label mistake
* Add more verbose to the test output to understand what is going on
* Check if differentiation is necessary between Debug and Release
* Follow the error given in Windows debug death test "')' is unsupported"
        D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src/gtest-port.cc(844): error: Failed
        Syntax error at index 42 in simple regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.
        Condition: minimum_ <= maximum_": ')' is unsupported.

        Running main() from D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src\gtest_main.cc
        D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
        Expected: contains regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_

        [  FAILED  ] TestBound.DeathTest (146 ms)
* The output differs in "inside Bound.\n Condition" from "inside egoa::Bound<double>::Bound.\n Condition".
 D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
                Expected: contains regular expression ".* assertion failed at .*Bound.hpp:.* inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_ 63a79b1
github-actions bot added a commit that referenced this pull request Dec 8, 2023
Enable TestBound in the CMakeFile of the test folder. In this version, we duplicate the CMake and CMake builds to download the Google Test Framework. This is required due to the fact that with the current option ExternalProject_Add the external project is only downloaded and installed during the first CMake build. We will change this in another PR to align it with the framework Eigen.

Tests that work on linux "obviously" do not work always with windows ¯_(ツ)_/¯, e.g., in debug mode.

The above test fail was due to the fact that (.*) regular expression is not supported, but .* is. The issue is only happening on Windows. In addition, the message looks a little bit different on Windows compared to Unix systems. The output differs in "inside Bound.\n Condition" (Unix) from "inside egoa::Bound::Bound.\n Condition" (Windows).

Commits:
* Enable TestBound in the CMakeFile
* Add TestBound testcases
* Remove Gurobi Library from TestBound
* Check whether Windows and MacOS find the include with that file
* Replace find_package with own find CMake for Google Testframework
* Downloads need an initial build then the data is on the disk
   Why:
           * add subdirectory in CMake requires the CMakeFile that is not downloaded yet
* Check sudo
* The error in the tests is due to wrong runtime library
* Does DLL works
* Check without debug
* Resolve libcpmt.lib(StlLCMapStringW.obj) : error LNK2038: mismatch detected for 'RuntimeLibrary': value 'MT_StaticRelease' doesn't match value 'MD_DynamicRelease' in TestBound.obj [D:\a\egoa\egoa\build\tests\TestBound.vcxproj]
      See note in: https://cmake.org/cmake/help/latest/variable/CMAKE_MSVC_RUNTIME_LIBRARY.html#variable:CMAKE_MSVC_RUNTIME_LIBRARY
* Fix a label mistake
* Add more verbose to the test output to understand what is going on
* Check if differentiation is necessary between Debug and Release
* Follow the error given in Windows debug death test "')' is unsupported"
        D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src/gtest-port.cc(844): error: Failed
        Syntax error at index 42 in simple regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.
        Condition: minimum_ <= maximum_": ')' is unsupported.

        Running main() from D:\a\egoa\egoa\external\GoogleTestFramework\googletest\src\gtest_main.cc
        D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
        Expected: contains regular expression "(.*) assertion failed at (.*)Bound.hpp:(.*) inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_

        [  FAILED  ] TestBound.DeathTest (146 ms)
* The output differs in "inside Bound.\n Condition" from "inside egoa::Bound<double>::Bound.\n Condition".
 D:\a\egoa\egoa\tests\DataStructures\TestBound.cpp(70): error: Death test: {egoa::Bound<> bound (3,1);}
                Result: died but not with expected error.
                Expected: contains regular expression ".* assertion failed at .*Bound.hpp:.* inside Bound.\n Condition: minimum_ <= maximum_"
        Actual msg:
        [  DEATH   ] USAGE assertion failed at D:\a\egoa\egoa\include\DataStructures/Bound.hpp:48 inside egoa::Bound<double>::Bound.
        [  DEATH   ]  Condition: minimum_ <= maximum_ 63a79b1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
tests Add or update tests to EGOA
Projects
Development

Successfully merging this pull request may close these issues.

1 participant