×

INDI Library v1.9.6 Released (21 May 2022)

Bi-monthly INDI Library released with new drivers and bug fixes.

Problems with unit tests

  • Posts: 17
  • Thank you received: 0
Hi, I'm just setting up a dev environment to try some things with KStars and I've hit a couple of issues with the unit tests on a clean build:
  1. Some unit tests eg. TestPlaceholderPath, TestPolarAlign failed to find the test data files - I had to link these to files in the build/bin directory:
    9filters.esq -> ../Tests/scheduler/9filters.esq
    ngc4535-autofocus1.fits -> ../Tests/polaralign/ngc4535-autofocus1.fits
    ngc4535-autofocus2.fits -> ../Tests/fitsviewer/ngc4535-autofocus2.fits
    ngc4535-autofocus3.fits -> ../Tests/fitsviewer/ngc4535-autofocus3.fits
    testFlexibleNamingChangeBehavior_data_small.csv -> ../Tests/capture/testFlexibleNamingChangeBehavior_data_small.csv
    testFlexibleNaming_data_small.csv -> ../Tests/capture/testFlexibleNaming_data_small.csv
    testFullNamingSequence_data_small.csv -> ../Tests/capture/testFullNamingSequence_data_small.csv
    testSchedulerProcessJobInfo_data.csv -> ../Tests/capture/testSchedulerProcessJobInfo_data.csv
  2. Test TestFitsData::testComputeHFR (NGC4535-3-NORMAL) fails. It finds 29 stars instead of the expected 30.
Are these bugs in the tests or have I messed up somewhere?
I'd like to have a clean reference before I start digging into the code.
Thanks
Ed
1 month 1 week ago #82977

Please Log in or Create an account to join the conversation.

  • Posts: 821
  • Thank you received: 396

Replied by Hy Murveit on topic Problems with unit tests

Ed,

When I run unit tests locally, I find I often have to run them in their $BUILD/Tests/$TEST_DIR directory.
So, for instance, in my case that would be:

```
cd ~/Projects/kstars-build/Tests/polaralign
../../bin/test_polar_align
```

I'm honestly not sure what the testing environment does when it runs its testing pipeline.
You can see a pipeline output, for instance, by looking at the pipeline link in an MR.
Here's my latest MR: invent.kde.org/education/kstars/-/merge_requests/628
and you can see a pipeline link on that page, which is also here: invent.kde.org/education/kstars/-/pipelines/178754
You should see that my MR passed all the "stable" tests, but had some issues with tests marked "unstable".

Interestingly, I didn't see any reference to TestFitsData in the pipeline output, not sure why.
I just tried to run that test, and also got failures, so it isn't you.
Clearly we need to look at it. Someone must have disabled it.
Don't have time to look right now.

Be aware that we don't have great test coverage, though it has been improved in the past year. It is certainly an area that would be great to improve.

Thank you for looking into things, and looking forward to see what you come up with.
Hy
AP1100 & Orion Atlas Pro, WO/ZS105 w/Moonlight V2 focus, GSO RC10 w/RSF focus
ZWO ASI1600, Astronomik Filters, ST80, QHY 5L-IIm.
KStars/Ekos/Indi on NUC10 & RPi4 w/SSD -- Ubuntu
Projects: Greedy Scheduler, Terrain, Polar Align, Analyze, Linear Focuser, SEP MultiStar & GPG Guide, FITS autostretch.
The following user(s) said Thank You: Ed Lee
1 month 1 week ago #82991

Please Log in or Create an account to join the conversation.

  • Posts: 17
  • Thank you received: 0

Replied by Ed Lee on topic Problems with unit tests

Thanks Hy. Glad it's not me.
1 month 1 week ago #82992

Please Log in or Create an account to join the conversation.

Time to create page: 0.317 seconds