-
Notifications
You must be signed in to change notification settings - Fork 11
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
Remove early return on startup.cpp
when testing is enabled
#169
Comments
If returned, the global variables REST_COMMIT/REST_PATH/REST_USER are not set. It will make REST behave differently. I think we should set these variables manually before early return under testing condition.
What are the anticipated values of these variables? |
I am not familiar with ctest. Seems that we can input c++ definitions to the code during the test. Then maybe it is also possible to do something like:
where REST_TESTING_XXX are all the imported c++ definitions from the test system. |
I am not sure if I follow. The early return is a dirty fix I made in order to avoid tests failing, I think it should be possible to modify this class to remove the early return logic and make it work both during testing and not testing. |
I was saying that the possible modification is like above. We can do the modification if someone specifies the REST_PATH, etc. values for testing environment. |
But wouldn't these values such as |
I guess not. |
When you run |
Originally startup.cpp caused problems with unit testing and to fix this we added an early return if testing was enabled:
This doesn't seem to affect the running of tests, but makes the framework behave differently when testing is enabled, this means that users should not use the framework with tests compiled to produced results etc. and only use it to run the tests, then compile it again without tests. This is also true for the pipeline where in order to run tests the framework is compiled twice.
There should be a way to modify this file so that tests can be run and also the file keeps working as intended, so that we can avoid recompiling twice.
The text was updated successfully, but these errors were encountered: