Changeset 849


Ignore:
Timestamp:
Dec 1, 2008, 10:01:33 PM (13 years ago)
Author:
Peter Johansson
Message:

defining state variable in config.h and when not in base1 mode slice out tests in wenni_test that are base1 specific.

Location:
plugins/base1/se.lu.thep.wenni/trunk
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • plugins/base1/se.lu.thep.wenni/trunk/configure.ac

    r848 r849  
    8282              [ state="base2" ])
    8383
     84AC_DEFINE_UNQUOTED([WeNNI_STATE], ["$state"],
     85                   [defined to configured state - base1, base2, or stand-alone])
    8486AM_CONDITIONAL([BASE1], [test x$state = xbase1])
    8587AM_CONDITIONAL([BASE2], [test x$state = xbase2])
  • plugins/base1/se.lu.thep.wenni/trunk/test/Makefile.am

    r836 r849  
    2828if BASE1
    2929CREATE_INDATA = run_base1_plugin
    30 else
    31 CREATE_INDATA = link_base_files
    3230endif
    3331
     
    4846
    4947run_base1_plugin:
    50   @(install -d raw_results && cd raw_results && ../wenni.pl --datatype raw \
     48  @($(MKDIR_P) raw_results && cd raw_results && ../wenni.pl --datatype raw \
    5149--nodelete < ../$(top_srcdir)/data/basefile_in.data > basefile_out.data);
    52   @(install -d default_results && cd default_results && ../wenni.pl \
     50  @($(MKDIR_P) default_results && cd default_results && ../wenni.pl \
    5351--nodelete < ../$(top_srcdir)/data/basefile_in.data > basefile_out.data);
    54 
    55 link_base_files:
    56   rm -f raw_results && ln -fs $(top_srcdir)/data raw_results && \
    57   rm -f default_results && ln -fs $(top_srcdir)/data default_results;
    5852
    5953clean-local:; rm -rf $(LINKS) default_results raw_results \
  • plugins/base1/se.lu.thep.wenni/trunk/test/wenni_test.cc

    r846 r849  
    2121  along with WeNNI. If not, see <http://www.gnu.org/licenses/>.
    2222*/
     23
     24#include <config.h>
    2325
    2426#include "c++_tools/gslapi/matrix.h"
     
    4749  bool teststatus=false;
    4850
    49   teststatus|=check_raw_results();
    50   teststatus|=check_default_results();
     51  if (WeNNI_STATE == "base1") {
     52    teststatus|=check_raw_results();
     53    teststatus|=check_default_results();
     54  }
    5155
    5256  std::string srcdir=get_srcdir();
    5357  std::stringstream system_call;
    54   system_call << "./nni -data default_results/wenni_logratio.data"
     58  system_call << "./nni -data " << srcdir << "/../data/wenni_logratio.data"
    5559              << " -neighbours 10 -weight " << srcdir
    5660              << "/../data/wenni_snr.data -weight_is_snr"
     
    6367
    6468  system_call.str("");
    65   system_call << "./nni -data default_results/wenni_logratio.data -neighbours 10"
    66               << " -nni_algorithm kNNI -weight default_results/wenni_weight.data"
     69  system_call << "./nni -data " << srcdir
     70              << "/../data/wenni_logratio.data -neighbours 10"
     71              << " -nni_algorithm kNNI -weight " << srcdir
     72              << "/../data/wenni_weight.data"
    6773              << " -weight_cutoff 0.5 > knni_imputed.data";
    6874  if (system(system_call.str().c_str())) {
Note: See TracChangeset for help on using the changeset viewer.