9dac69c5ebf85c1d1683cb83e1da23b7222d727f
4 #Testing procedure for EMGLLF (inside this folder):
6 algo
=$1 #EMGLLF or EMGrank,
7 #second arg indicate if rebuild or rebuild+clean requested
9 if [ "$2" == 'c' ]; then
10 #0.1) Clean package + C testing code
11 find ..
/pkg
/man
/ -type f
! -name 'valse-package.Rd' -delete
12 rm -f ..
/pkg
/NAMESPACE
13 # Erase object and library files
15 rm -f ..
/pkg
/src
/adapters
/*.o
19 if [ "$2" == 'r' ] || [ "$2" == 'c' ]; then
20 #0.2) Install current version of the package (WARNING: roxygen 2 v5.0.1)
21 # --> devtools::install_github('klutometis/roxygen@v5.0.1')
22 echo "setwd('../pkg');library(roxygen2);roxygenize('.')" | R
--slave
26 #1) Generate data using R versions of EMGLLF/EMGrank (slow, but trusted)
27 echo -e "source('generateRunSaveTest_$algo.R');\n \
28 # I'm happy with default values - feel free to give args\n \
29 generateRunSaveTest_$algo() " \
32 #2) Compile test C code into an executable named "test.$algo"
35 #3) Run it with valgrind!