-
Notifications
You must be signed in to change notification settings - Fork 138
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
[cygwin] "make check" fails #15
Comments
Closed
tueda
added a commit
to tueda/form
that referenced
this issue
Sep 1, 2015
Motivations: - The old test suite depended on strace utility, so did not work on OS X and Cygwin (vermaseren#15). - ParFORM support should be added. - Writing Ruby classes for test cases still seems to set a high bar. How to run: - From Autoconf/automake build system: $ make check - Standalone mode: $ ./check/check.rb [/path/to/form] By default, "*.frm" files in the "check" directory are used for the test, where each test case is supposed to finish within 10 seconds. Test cases requiring more time can be put in subdirectories. To run them: $ ./check/check.rb -C subdir -t 100 where "-t 100" sets the timeout to 100 seconds. New Format: - Small Ruby code for assertions is embedded into FORM code (*.frm). - Test files look something like: #ifndef `TEST' #message Use -D TEST=XXX #terminate #else #include `NAME_' # `TEST' #endif .end *--#[ Test1 : S x; L F = (1+x)^2; P; .end assert succeeded? assert result("F") =~ expr("1 + 2*x + x^2") *--#] Test1 : Each fold corresponds to a test case. Ruby code for assertions are written after ".end". - One can also run the above test case directly from FORM (with its file name "test.frm"): $ form -D TEST=Test1 test.frm although the assertions written in Ruby are not checked. Note that FORM just ignores lines after ".end".
tueda
added a commit
to tueda/form
that referenced
this issue
Sep 1, 2015
Motivations: - The old test suite depended on strace utility, so did not work on OS X and Cygwin (vermaseren#15). - ParFORM support should be added. - Writing Ruby classes for test cases still seems to set a high bar. How to run: - From Autoconf/automake build system: $ make check - Standalone mode: $ ./check/check.rb [/path/to/form] By default, "*.frm" files in the "check" directory are used for the test, where each test case is supposed to finish within 10 seconds. Test cases requiring more time can be put in subdirectories. To run them: $ ./check/check.rb -C subdir -t 100 where "-t 100" sets the timeout to 100 seconds. New Format: - Small Ruby code for assertions is embedded into FORM code (*.frm). - Test files look something like: #ifndef `TEST' #message Use -D TEST=XXX #terminate #else #include `NAME_' # `TEST' #endif .end *--#[ Test1 : S x; L F = (1+x)^2; P; .end assert succeeded? assert result("F") =~ expr("1 + 2*x + x^2") *--#] Test1 : Each fold corresponds to a test case. Ruby code for assertions are written after ".end". - For many of test cases, checking whether FORM finished successfully and checking results in expressions are enough. In the above Ruby code, `succeeded?` gives true if FORM finished with the exit status 0, `result("F")` gives the string representation of the expression "F" (lastly printed by Print statement), and `expr("1 + 2*x + x^2")` is a pattern to be matched with the whole expression (whitespace including new lines are ignored). - One can also run the above test case directly from FORM (with its file name "test.frm"): $ form -D TEST=Test1 test.frm although the assertions written in Ruby are not checked. Note that FORM just ignores lines after ".end".
The new test suite seems to work, except the cases memory allocations fail or timeout. (I got failures with "No memory while allocating" or timeouts on my laptop, especially for 64-bit tform.) So I would close this issue. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Here I just record what I encountered for
make check
within Cygwin 1.7.30 (both x86_64 and i686) on Windows 7 (SP1, x86_64):There are two problems:
strace
differs from that on Linux. It just ignores the-ff
option. Moreover, the system callexit_group
is not called on Cygwin, so thereturn_value
method always fails.Sec_15
takes about 10 seconds under thestrace
run. (The output looks OK.) So theform.rb
often tries to kill the process due toTIMEOUT=10
, and somehow causes a segfault of Ruby at closing@outputstream
(maybe still used by the process being killed?).The text was updated successfully, but these errors were encountered: