Skip to content
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

Add automated tests, also for non-Unix systems #5

Closed
2 tasks done
nuest opened this issue Jul 14, 2016 · 12 comments
Closed
2 tasks done

Add automated tests, also for non-Unix systems #5

nuest opened this issue Jul 14, 2016 · 12 comments
Assignees
Labels

Comments

@nuest
Copy link
Member

nuest commented Jul 14, 2016

@nuest
Copy link
Member Author

nuest commented Jul 20, 2016

@nuest nuest added the feature label Jul 20, 2016
@nuest nuest self-assigned this Jul 20, 2016
@nuest
Copy link
Member Author

nuest commented Jul 20, 2016

There are some issues with gdal on Travis:

First try: use dist: trusty, see https://docs.travis-ci.com/user/trusty-ci-environment/
If the does not work, use Edzer's approach

@nuest
Copy link
Member Author

nuest commented Jul 20, 2016

trusty not directly a solution: https://travis-ci.org/nuest/containeRit/jobs/146131446

@nuest
Copy link
Member Author

nuest commented Jul 20, 2016

https://github.com/edzer/sfr/blob/master/.travis.yml uses language: r and libproj from sources...

@nuest
Copy link
Member Author

nuest commented Jul 21, 2016

https://github.com/edzer/sfr/blob/master/.travis.yml uses language: r and libproj from sources...

gcc -std=gnu99 -I/home/travis/R-bin/lib/R/include -DNDEBUG -I/usr/local/include -I/home/travis/R-bin/include -I"/home/travis/R/Library/sp/include"   -fpic  -g -O2  -c inverser.c -o inverser.o

inverser.c:3:22: fatal error: projects.h: No such file or directory

compilation terminated.

make: *** [inverser.o] Error 1

@MatthiasHinz
Copy link
Collaborator

https://travis-ci.org/MatthiasHinz/containerit/builds/212285890

This is the first time that I saw this test succeeding!!! I hope it stays like this.

@nuest
Copy link
Member Author

nuest commented Mar 22, 2017

Great. So Linux works now.

@nuest
Copy link
Member Author

nuest commented Jul 18, 2019

nuest@69988f7 adds Appveyor, tough not working yet..

@nuest
Copy link
Member Author

nuest commented Jul 22, 2019

Skipped a few tests, but still problem with paths:

--------------------------------------------------------------------------------
x |   8 4   4 | Packaging R-Scripts and workspace directories. [6.6 s]
--------------------------------------------------------------------------------
test_package_script.R:10: skip: an R script can be created with resources of the same folder 
stevedore::docker_available()
test_package_script.R:48: failure: a workspace with one R script can be packaged
toString(the_dockerfile) not equal to `expected_file`.
1/5 mismatches
x[4]: "COPY [\"\\package_script\\resources/\", \"/package_script/resources/\"]"
y[4]: "COPY [\"package_script/resources/\", \"package_script/resources/\"]"
test_package_script.R:60: failure: a workspace with one R script can be packaged if the script file has .r (lowercase) extension
toString(the_dockerfile) not equal to `expected_file`.
1/6 mismatches
x[5]: "COPY [\"\\package_script\\simple_lowercase/\", \"/package_script/simple_l
x[5]: owercase/\"]"
y[5]: "COPY [\"package_script/simple_lowercase/\", \"package_script/simple_lower
y[5]: case/\"]"
test_package_script.R:75: failure: a list of resources can be packaged 
`generated_file` not equal to `expected_file`.
3/7 mismatches
x[4]: "COPY [\"\\package_script\\resources\\simple_test.R\", \"/package_script/r
x[4]: esources/simple_test.R\"]"
y[4]: "COPY [\"package_script/resources/simple_test.R\", \"package_script/resour
y[4]: ces/simple_test.R\"]"
x[5]: "COPY [\"\\package_script\\resources\\test_table.csv\", \"/package_script/
x[5]: resources/test_table.csv\"]"
y[5]: "COPY [\"package_script/resources/test_table.csv\", \"package_script/resou
y[5]: rces/test_table.csv\"]"
x[6]: "COPY [\"\\package_script\\resources\\test_subfolder\\testresource\", \"/p
x[6]: ackage_script/resources/test_subfolder/testresource\"]"
y[6]: "COPY [\"package_script/resources/test_subfolder/testresource\", \"package
y[6]: _script/resources/test_subfolder/testresource\"]"

@nuest
Copy link
Member Author

nuest commented Jul 23, 2019

I cannot get stevedore to work on Appveyor: #151

@nuest
Copy link
Member Author

nuest commented Jul 23, 2019

Some challenges remain for running tests with R devel version, but the first check succeded:

https://ci.appveyor.com/project/nuest/containerit/builds/26176618/job/mp7x4whoymvgll97

@nuest
Copy link
Member Author

nuest commented Jul 23, 2019

image

https://ci.appveyor.com/project/nuest/containerit/builds/26177497

AND

https://ci.appveyor.com/project/nuest/containerit-rrvpq/builds/26177502

[...]
Rscript -e "devtools::test()"
Loading containerit
Creating a generic function for 'write' from package 'base' in package 'containerit'
Testing containerit
v |  OK F W S | Context
v |   0     5 | Base image helper functions [17.9 s]
--------------------------------------------------------------------------------
test_baseimage.R:6: skip: Installed packages can be read from a Docker image
stevedore::docker_available()
test_baseimage.R:20: skip: Installed packages are a data.frame with the image as an attribute
stevedore::docker_available()
test_baseimage.R:31: skip: List of installed packages can be filtered when creating a Dockerfile
stevedore::docker_available()
test_baseimage.R:49: skip: Filtered list of installed packages does not filter GitHub packages
stevedore::docker_available()
test_baseimage.R:70: skip: Filtered list of installed packages is alphabetical
stevedore::docker_available()
--------------------------------------------------------------------------------
v |   1       | Install packages from Bioconductor [2.4 s]
v |  18       | CMD instruction [1.1 s]
v |   3       | Adding comments to Dockerfile [0.7 s]
v |   4       | COPY instruction
v |   9     3 | Dockerfile generation [1.6 s]
--------------------------------------------------------------------------------
test_dockerfile-method.R:58: skip: The package containerit is not packaged by default
On CI
test_dockerfile-method.R:69: skip: The package containerit is not packaged (add_self = FALSE)
On CI
test_dockerfile-method.R:80: skip: The package containerit can be packaged (add_self = TRUE)
On CI
--------------------------------------------------------------------------------
v |  14       | ENTRYPOINT instruction [0.4 s]
v |  12       | EXPOSE instruction [0.5 s]
v |  10       | Find system requrirements [8.8 s]
v |   4       | FROM instruction
v |   8       | Detecting image for R version [0.9 s]
v |   2       | Install packages from GitHub [0.7 s]
v |   4       | LABEL instruction [0.5 s]
v |  11       | MAINTAINER instruction [1.7 s]
v |   1       | Metadata Creation: Label Schema factory
v |   6       | Packaging a DESCRIPTION file [3.3 s]
v |   6       | Packaging expression [3.3 s]
v |   6     8 | Package R markdown files
--------------------------------------------------------------------------------
test_package_markdown.R:6: skip: A markdown file can be packaged (using units expample)
Results differ from execution with all tests and single/manual execution
test_package_markdown.R:22: skip: The sf3 markdown file can be packaged
On CI
test_package_markdown.R:72: skip: The file is copied
On CI
test_package_markdown.R:79: skip: File copying is disabled by default
On CI
test_package_markdown.R:86: skip: File copying can be disabled with NA/NA_character
On CI
test_package_markdown.R:96: skip: File copying can be disabled with NULL
On CI
test_package_markdown.R:104: skip: Packaging fails if dependency is missing and predetection is disabled
On CI
test_package_markdown.R:115: skip: Packaging works if dependency is missing in the base image and predetection is enabled
On CI
--------------------------------------------------------------------------------
v |  13     5 | Packaging R-Scripts and workspace directories. [7.4 s]
--------------------------------------------------------------------------------
test_package_script.R:19: skip: an R script can be created with resources of the same folder 
stevedore::docker_available()
test_package_script.R:95: skip: trailing slashes are added to directories if missing
On Appveyor
test_package_script.R:120: skip: The gstat demo 'zonal' can be packaged 
On CI
test_package_script.R:176: skip: packaging fails if library from script is missing without predetection
On CI
test_package_script.R:195: skip: packaging works if library from script is missing but predetection is enabled
On CI
--------------------------------------------------------------------------------
v |  28       | Packaging sessionInfo saved in .RData file [7.5 s]
v |  17     2 | Packaging with explicit versioning [0.5 s]
--------------------------------------------------------------------------------
test_package_with-versions.R:6: skip: error during build when installing too old a version
stevedore::docker_available()
test_package_with-versions.R:88: skip: generated versioned Dockerfile can be build and executed
stevedore::docker_available()
--------------------------------------------------------------------------------
v |   7       | RUN instruction
v |  16       | Save workspace and R objects (save_image - argument) [9.3 s]
v |   1     1 | Session reproduction [0.6 s]
--------------------------------------------------------------------------------
test_sessioninfo_reproduce.R:19: skip: a sessionInfo can be reproduced with Docker
stevedore::docker_available()
--------------------------------------------------------------------------------
== Results =====================================================================
Duration: 69.5 s
OK:       201
Failed:   0
Warnings: 0
Skipped:  24
travis-tool.sh run_tests

[...]

@nuest nuest closed this as completed Jul 23, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants