Commit | Line | Data |
---|---|---|
3f3ed99c BA |
1 | #!/bin/sh |
2 | ||
3 | #Testing procedure for EMGLLF (inside this folder): | |
4 | ||
5 | #0) Install current version of the package | |
6 | # Should be library(roxygen2);roxygenize('.'), but roxygen2 6.0.1 bug | |
7 | # ==> temporary workaround with devtools + document() | |
8 | echo "setwd('../pkg');library(devtools);document()" | R --slave | |
9 | R CMD INSTALL ../pkg | |
10 | ||
11 | #1) Generate data using R versions of EMGLLF/EMGrank (slow, but trusted) | |
12 | cd generate_test_data/ | |
13 | echo "source('generateRunSaveTest_EMGLLF.R');\ | |
14 | # I'm happy with default values - feel free to give args | |
15 | generateRunSaveTest_EMGLLF() "\ | |
16 | | R --slave | |
17 | ||
18 | #2) Compile test C code | |
19 | # Next line might be required sometimes, to destroy all .o and .so | |
20 | make cclean | |
21 | # Next line compile the test into an executable named "test.EMGLLF" | |
22 | make test.EMGLLF | |
23 | ||
24 | #3) Run it! | |
25 | # Fingers crossed, hoping everything is alright | |
26 | ./test.EMGLLF | |
27 | # Ask valgrind (generally better idea ;) ) | |
28 | valgrind ./test.EMGLLF | |
29 | ||
30 | #For EMGrank: same procedure, just change EMGLLF to EMGrank everwhere. |