-
Notifications
You must be signed in to change notification settings - Fork 4
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
unit tests for 'test_dbW_functionality.R' fail on appveyor but not on travis #43
Comments
@Zachary-Kramer it would be great if you could take a look at this. I am trying to get 'rSOILWAT2' to compile on Windows OS for Rachel. I don't have access to a Windows machine which makes this type of issues hard to track down. It would be great if you could tell me whether this repeats on your Windows installation or not, e.g., by running |
Same problem on r-hub for 'Windows Server 2008 R2 SP1, R-patched, 32/64 bit':
|
rSOILWAT2 compilation/loading works with rSOILWAT2 loading fails with
testthat output:
Is there more information I can provide? Has Rachel tried the --no-multiarch option? |
Many thanks for the quick response! Since arch i386 has Did you test with commit c648a10 from the master branch? This commit is more rigorous in deleting the temporary test objects between the different unit tests. She cannot compile on her computer. I have asked that she updates the R version and installs the corresponding Rtools. Remote problem-solving on an OS that I don't understand is hard -- hence, the new binary package section in the READMEs. |
Good catch, compiling and loading rSOILWAT2 worked with Rachel should also make sure she has up to date packages. Before running test(), I had a couple out-of-date ones, like RSQLite. |
Rachel's problem has been solved. The problem was that the default R package build from appveyor was for a 32-bit R and she uses 64-bit. I fixed that with a matrix build over both |
The problem underlying this issue appears to be that the unit testing code 'test_dbW_functionality' and the function
The unit test code defines this file with R base commands @Zachary-Kramer, do you have any clue what is going on here: why can the code create this file, but not delete it? |
Is Appveyor an admin? You could try a force delete just to be safe. Also, the file path is a bit weird. The change from |
I attempted with I am not sure about the permissions on appveyor, but it is suggested that the appveyor build agent is a member of admin. However, there seems to be issues with proper inheritance of permissions... at least based on some comments on this discussion thread about permission issues on appveyor: http://help.appveyor.com/discussions/problems/938-getting-permission-denied-errors-when-trying-to-make-a-temp-directory Thanks for the tip that Windows OS may believe that |
The unquoted path is (I used
So Windows OS can provide write but not delete permissions as a default to a user of the admin group? |
Okay, the unquoted path makes sense and shouldn't be an issue. I'm unsure of Window's write permissions to the temp directory, though you have to be an admin to delete. Though if Appveyor lacked permission I would assume that an obvious "Access is denied" error would show up in R, like it does when trying to modify an open CSV. To be 100% certain, you could replace tempfile with a hard-coded path to a standard folder (e.g. C:/test) to confirm that it isn't a permissions issue. Do you know if it's possible that the database is in use? Unlink() will remove some locked files, like text files, but not .sqlite3 files. It'll just silently fail. |
I tested with a hard-coded path to I added two unit tests: one to I now also make sure that |
Hmm, that rules out all the simple reasons. You should check the return value of unlink to see if it thinks it failed, or try file.remove with showWarnings set to true. I can look a little more into it tonight. |
Apparently, it is tricky for many to make sure that btw, |
I added a @Zachary-Kramer I would greatly appreciate if you could look into this issue #43 and the branch addressing it bugfix_44 and its pull-request #45. Sorry, I know - bad name -- I created this branch to address issue #44 and then got sidetracked with issue #43 and forgot to move to a new dedicated branch... |
- remove this commit and have these unit tests run on appveyor once issue #43 is fixed (unit tests for 'test_dbW_functionality.R' fail on appveyor but not on travis)
Undo 05ee7a3 once this is solved. |
Noted. I do not have any allocated time to debug this, so if it is urgent it should be assigned to someone else. SSURGO and high priority CO2 features have a higher importance at the moment, and I only work 10 hours a week. If it's not urgent, I can get to it in a couple weeks or so. |
@Zachary-Kramer Please take a look into this when you get time to do so. It doesn't seem to be urgent: I haven't heard from Rachel that she has problems with rSOILWAT2 on Windows OS so far. |
This issue is now showing up on Github Actions workflow on only Windows 64 (not 32) (commit 9ea46fe) https://github.com/DrylandEcology/rSOILWAT2/runs/3557590269?check_suite_focus=true
|
- these unit tests fail on Github Actions on Windows 64bit - this is due to issue #43 --> activate the unit tests once this issue is resolved!
Commit: c648a10
Output from travis:
Output from appveyor:
The text was updated successfully, but these errors were encountered: