Comments (11)
@blippy would you mind looking at this? AFAIK there was no make check
before autotools came along (but I could be mistaken)
from datetime-fortran.
@zbeekman Sure, I'll take a look at it. I've never done a test harness before, but the way I understand it is that autotools uses a program's exit code to determine if there's been a pass or fail. So I may have to modify the test program to effect this.
from datetime-fortran.
I may be mistaken, but I didn't see anything running with make check
. I saw it compile stuff, but the tests never ran. (Unless all their output was redirected.)
Don't worry about the stop code yet; most compilers respect Fortran stop #
where #
is some positive integer and use that as the exit code. I'm happy to look at what (if any) changes need to be applied to the test program. Just ensuring that it is actually compiled and run is enough of a start for me.
from datetime-fortran.
@zbeekman That's correct, nothing runs when you do make check
. Autotools does have testing facilities, but I am not yet familiar with how to use them.
Stay tuned.
from datetime-fortran.
Added some test functionality as part of recent commits.
It's clunky in how it does it, but doing 'make check' should now work.
A better solution would be to have datetime_tests output lines:
test PASS empty datetime() constructor test FAIL semi-empty datetime() constructor
instead of
test emtpy datetime() constructor : PASS test semi-empty datetime() constructor : FAIL
and so on, and avoid the use of escape sequences. tests-env.sh
massages the output, and it would be easier and more robust if it was in a more suitable form for processing.
from datetime-fortran.
@blippy 🙇 🎉
from datetime-fortran.
Ideally I think we should engineer the output format of datetime_tests so that not so much data munging is required. It works for now, I guess, which is the main thing.
I generally don't run 'make check' when I install software, although it light of some of the problems that are highlighted, it is a worthwhile exercise.
It took me awhile to figure out how to do the checking, as the autotools documentation was a bit on the sparse side. Apparently it can do parallel checking, but I'm not sure I want to go there.
from datetime-fortran.
@blippy fair. I just returned from the gym, and need to cleanup and run an errand, but then I plan on taking your PR for a spin. I think if that all looks good, I'll merge it (assuming @milancurcic doesn't have any objections, mint a new release, and then submit the Homebrew formula PR.
I agree with you about the tests, but maybe we can include a command line flag to the test program to include or exclude color escape sequences...
Also, what do you think about:
PASS: test emtpy datetime() constructor
FAIL: test semi-empty datetime() constructor
wouldn't that be even easier to parse?
from datetime-fortran.
Either way will work.
What happens is that datetime_tests get written to a log file. So anyone can have a look at the original output.
The testing script then takes the output and creates a trs file having lines like
:test-result: PASS foo ...
It looks as though autotools picks up these lines and performs a count.
from datetime-fortran.
Sounds great to me, thanks @blippy!!
@zbeekman yes, the plan is good, please go ahead with the merge and push when ready. Also please add yourself to CONTRIBUTORS.
from datetime-fortran.
The testing script then takes the output and creates a trs file having lines like
:test-result: PASS foo ...It looks as though autotools picks up these lines and performs a count.
So, let's scrap the colon in the output I suggested, and then we can just prepend the :test-result:
when we parse the test output. Nice work @blippy!
from datetime-fortran.
Related Issues (20)
- Document building with cmake and autotools HOT 1
- Define output (write) methods for datetime and timedelta instances HOT 1
- strptime does not handle errors HOT 1
- Cannot set seconds or others of timedelta HOT 3
- strptime does not zero tm struct before calling c_strptime HOT 1
- Error invoking datetime constructor with ifort-17.0.5 HOT 10
- Very strange (possibly compiler) bug with date2num HOT 3
- incorrect literal with REAL64 kind HOT 8
- add support for mingw HOT 1
- Can't build tests on win-ifort. Fails on linker with strptime HOT 4
- "undefined reference" when using datetime-fortran HOT 7
- Building with autotools (not all libs are copied) HOT 9
- Dealing with huge timedelta values HOT 5
- Generic procedure including a sub-class of TimeDelta HOT 3
- Bug in function now() HOT 2
- Strptime Undefined Reference Error HOT 7
- Hour comparison in num2date is incorrect HOT 2
- Function that ingests ISO format and returns datetime? HOT 1
- CMake uses different compiler flags to autotools HOT 6
- Processing of `secondsSinceEpoch` and its reverse processing routine. HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from datetime-fortran.