[NASArb-developers] [fUnit-support] This dummy requires additional assistaqnce to set up tests using funit 0.9.3.
Bil.Kleb at NASA.gov
Fri Mar 7 10:00:02 EST 2008
Note: migrating to the nasarb-developers list; I'm trying
to consolidate lists...
Paul van Delst wrote:
> Is there any additional information on using funit?
Unfortunately not other than the examples, e.g.,
a very old pitch,
and the rdoc pages,
> For example, I have the following CRTM_Interpolation_new.fun file (no tests yet):
> integer, parameter :: NIDX = 10
> real(fp) :: x_regular(NIDX)
> x_regular = (/0.5_fp,1.5_fp,2.5_fp,3.5_fp,4.5_fp,5.5_fp,6.5_fp,7.5_fp,8.5_fp,9.5_fp/)
> It requires definition of "fp" via a type_kinds.f90 module (see my question#2 below)
> When I run funit I get the following:
> lnx:Interpolation/Test : funit CRTM_Interpolation_new
> expanding CRTM_Interpolation_new.fun...done.
> computing dependencies
> locating associated source files and sorting for compilation
> /usr1/wd20pd/local/gfortran/irun/bin/gfortran -o TestRunner
> CRTM_Interpolation_new_fun.f90 TestRunner.f90
> use CRTM_Interpolation_new
> Fatal Error: Can't open module file 'crtm_interpolation_new.mod' for reading at (1): No
> such file or directory
> use CRTM_Interpolation_new_fun
> Fatal Error: Can't open module file 'crtm_interpolation_new_fun.mod' for reading at (1):
> No such file or directory
> `compile_tests': Compile failed. (RuntimeError)
> from /usr1/wd20pd/local/rubygemrepository/gems/funit-0.9.3/lib/funit.rb:28:in
> from /usr1/wd20pd/local/rubygemrepository/gems/funit-0.9.3/bin/funit:10
> from /usr1/wd20pd/local/rubygemrepository/bin/funit:18:in `load'
> from /usr1/wd20pd/local/rubygemrepository/bin/funit:18
> So my questions:
> 1) how does one specify the dependencies? It says it computes them but that's not
> reflected in the compile.
Through the 'fortran' gem, viz,
dependencies = Fortran::Dependencies.new
which uses the default search path from,
:search_paths => [ '.', '../lib' ]
A hook for a user-specified dependency path is a TODO item.
> 2) how does one "use" other modules in the test build? This test only requires one
> additional module (the type_kinds one), but I have situations where I might need 4 or 5
For pure unit testing, dependencies are to be avoided, but
in practice this isn't always possible...
Unfortunately, fUnit needs some love, but our team members
have been swamped of late. We haven't even managed to roll
in the patches that Diego Virasoro provided -- see
If you're interested in joining "the team", I'm all ears!
More information about the NASArb-developers