b8caf8ee78244d856f8443c19353b4eb667db630
[valse.git] / test / README
1 #!/bin/sh
2 set -e
3
4 #Testing procedure for EMGLLF (inside this folder):
5
6 #0) Install current version of the package
7 # Should be library(roxygen2);roxygenize('.'), but roxygen2 6.0.1 bug
8 # ==> temporary workaround with devtools + document()
9 echo "setwd('../pkg');library(devtools);document()" | R --slave
10 R CMD INSTALL ../pkg
11
12 #1) Generate data using R versions of EMGLLF/EMGrank (slow, but trusted)
13 cd generate_test_data/
14 echo -e "source('generateRunSaveTest_EMGLLF.R');\n \
15 # I'm happy with default values - feel free to give args\n \
16 generateRunSaveTest_EMGLLF() " \
17 | R --slave
18 cd ..
19
20 #2) Compile test C code
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.