apjanke / octave-testify

New BIST (Built-In Self Test) functions for GNU Octave
GNU General Public License v3.0
4 stars 2 forks source link

Runtests2 () ended with a file not found error. #94

Open doug1946 opened 4 years ago

doug1946 commented 4 years ago

My sytsem is Ubuntu 18.04 Octave stable compiled at

hgid
ans = 956d9fc2b73d

I believe this is the latest.

Here is the end of the output:

  ./.local/share/Trash/expunged/1382146796/5.0.1/m/specfun/betaln.m  PASS      9/9
  ./.local/share/Trash/expunged/1382146796/5.0.1/m/specfun/cosint.m Symbolic pkg v2.8.0: Python communicationlink active, SymPy v1.3.
error: 'file' undefined near line 447 column 69
error: called from
    run_tests at line 447 column 9
    run_tests at line 334 column 18
    runtests2 at line 114 column 9
apjanke commented 4 years ago

Oh crap, that's not right! Even if there's an error in the underlying test code, runtest2 should be protecting against that, and forwarding it off to a later test summary result.

I'll get on this when I have some spare time tomorrow.

Thanks for the bug report!

doug1946 commented 4 years ago

I tried to do some digging and found this: 1) I ran runtests2 ("specfun") and it did not report "file" undefined 2) I ran runtests2("cosint.m") and again did not report "file" undefined 3) i then tried to find an output file to see where the fails were but have not found and results log files.

apjanke commented 4 years ago

Here's what I get when trying to test cosint using the latest Testify:

>> which cosint
'cosint' is a function from the file /Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app@4.4.1/4.4.1/share/octave/4.4.1/m/specfun/cosint.m
>> runtests2('cosint')
error: fileread: cannot open file
error: called from
    fileread at line 37 column 5
    file_has_tests at line 362 column 11
    run_tests at line 328 column 11
    runtests2 at line 122 column 9
>> runtests2('cosint.m')
warning: fopen: '/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app@4.4.1/4.4.1/share/octave/4.4.1/m/specfun/cosint.m' found by searching loadpath
warning: called from
    fileread at line 35 column 7
    file_has_tests at line 362 column 11
    run_tests at line 328 column 11
    runtests2 at line 122 column 9
  cosint.m ....................................................warning: fopen: '/Applications/Octave-4.4.1.app/Contents/Resources/usr/Cellar/octave-octave-app@4.4.1/4.4.1/share/octave/4.4.1/m/specfun/cosint.m' found by searching load path
warning: called from
    extract_test_code at line 545 column 16
    run_tests at line 241 column 17
    run_tests at line 334 column 18
    runtests2 at line 122 column 9
 PASS     29/29

Summary:

  GNU Octave Version: 4.4.1 (hg id: 1f46d371968c + patches)
  Tests run on angharad.local (macOS) at 29-May-2020 04:02:55
  Test execution time: 00:00:00

  PASS                               29
  FAIL                                0

>>

That's not right. It should be able to find the function in both cases, and not issue warnings in either case.