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

Added more tests cases (those located into Fox_library/test folder. #40

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

victorsndvg
Copy link

Tests will be compiled and performed with CTest if BUILD_TESTING
CMake variable is set to ON.

Minor fix in sax/test/m_canonicalize.f90 when applying len() to
a dictionary_t type.

Note: Some tests failed! I don't know if it is the expected behaviour, but I cannot check all the existing tests. Some tests are dependant on a test.xml file that actually doesn't exists, maybe there are dependencies between tests (something like first write then read)?

Tests will be compiled and performed with CTest if BUILD_TESTING
CMake variable is set to ON.

Minor fix in sax/test/m_canonicalize.f90 when applying len() to
a dictionary_t type
@andreww
Copy link
Owner

andreww commented Oct 22, 2015

Sorry - dropped the ball on this... start of term here. Anyway, thanks for the patch.

I think the failures are because some test cases are supposed to exit with an error. For example, we want to test that an attempt to write '' with wxml fails with an error. This is an example - and we check that this comes out on standard error.

I guess the question is if we can do this sort of testing with cmake. That is check that we get certain output as well as check that the code builds and runs without returning a non-zero exit code (which is what I think is happening now). Our general rule is that tests called "file.f90" alongside a file called "file.xml" should run and produce the XML document. Tests called "file.f90" alongside a file called "file.out" should fail to run and generate the error message in the .out file. The current test harness is cobbled together out of shell scripts and sticky tape, and I wonder if it is possible to replicate this.

I'll try and think about this some more, and read the ctest documentation properly. But I don't know that I'll be able to do this quickly.

@victorsndvg
Copy link
Author

Hi @andreww ,

is a good question, but I cannot give you light on that.

I hope to have some time as soon as possible to read about that and give you an answer, but actually I don't know how do this kind of test/comparisson.

In a fast search I've found the following post:

http://cmake.3232098.n2.nabble.com/testing-with-standard-output-td3256689.html

It makes reference to the execute_process CMake command and the CMake comparisson util (cmake -E compare_files)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants